I am writing this post because I was one day confronted with the situation when I had to move a whole bunch of HTTP Services to be called via Azure API Management. These services were serving mobile calls from both iOS and Android devices.
All nice and well but the problem I got was that some of these services should have their response cached for a period of time so that the apps would not call them every single time. The API management does indeed provide some settings to set caching but for some reason whenever the apps would call any of the cached services the “Cache-Control” header was always set to private instead of public as it was desired ( here is some interesting reading about Cache-control headers ).
So in this picture you can see how I was setting the caching in the Azure API Management :
This was not enough. The cache was still private and not having a max-age value until I specifically inserted in the caching policy of that specific operation.
Hope this post helps someone. Leave a message if it did ;).
Alin Parjolea
System Developer at Pentia. I have been involved in small and large scale projects using Sitecore and .Net for the last 4 years. I am Sitecore certified developer since 2009. I have a Master degree in Computer Science from University of Southern Denmark. More detailed info about me can be found on my Facebook and LinkedIn pages.
- More Posts