How is the cacheControlMaxAge intended to work and be used?

217
0
04-01-2024 11:11 AM
RyanUthoff
Occasional Contributor III

I am trying to optimize our feature services as much as possible and noticed there is a cacheControlMaxAge parameter. I was able to successfully set this parameter because I can see that parameter being set when watching the internet traffic (see this Esri article for reference https://enterprise.arcgis.com/en/server/latest/publish-services/windows/feature-services-and-client-...)

However, I was wondering how the cacheControlMaxAge is intended to be used, or if it works how I think it's supposed to work?

What I would like, and what appears that this feature is intended to do per the documentation, is to temporarily cache the results of the feature service in a map viewer for X minutes so if someone pans around in the map, it won't resend that request for features that are already drawn to the ArcGIS Server and therefore saving internet bandwidth and server resources.

However, in my testing, I am seeing that features are not actually getting cached in the browser. For example, I will open a map and load a few layers. I will then edit the layer directly in the DB through ArcGIS Pro. Then, still within the cache timeframe, I will pan around and see that the data has been updated. To my understanding, if the data is truly cached, I should not be able to see any data updates until I reach the cache max age, correct?

If I am correct, that is not working properly in my test environment. And if I am not correct, can someone tell me how the cacheControlMaxAge is intended to work and be used?

0 Kudos
0 Replies