AnsweredAssumed Answered

Disable client caching for a map service layer

Question asked by trentonrawlinson on Jul 5, 2016
Latest reply on Jul 7, 2016 by trentonrawlinson

I recently created a web app for road travel conditions using Web AppBuilder on ArcGIS Online, downloaded the code and hosted it on one of our servers. I am having a problem with cached data using a map service layer. Once you navigate back to an extent that you have previously been to a "304 Not Modified" is returned and cached data is displayed. Our road condition data changes frequently and I can't have old data displaying when someone goes back to an extent they have previously been to.

 

In the web map the refresh interval for this map service is not set. In other apps I have developed using the JavaScript API I can use the "setDisableClientCaching" parameter on the map service layer. Is there something similar that I can set in WAB? I tried setting it in the jimu.js/main.js with no luck.

 

Other layers in the app are brought into the web map as feature layers with refresh intervals set and they work great. The symbology being used for the road conditions is not supported as a feature layer so I am restricted to using a map service layer.

 

Any help is greatly appreciated.

Outcomes