[OpenLayers-Users] How control openlayers local caching of tiles?
Uggla Henrik
Henrik.Uggla at kristianstad.se
Thu Aug 21 06:42:52 PDT 2014
Oh, I forgot to mention that we are using Openlayers-2.13.1.
/H
________________________________
Från: Uggla Henrik
Skickat: den 21 augusti 2014 15:27
Till: openlayers-users at lists.osgeo.org
Ämne: How control openlayers local caching of tiles?
Hi!
Openlayers seems to cache tiled WMS layers (but not single tile) locally in the browser. I need to be able to clear the cache when a user clicks a button but haven't managed to find out how to do it. In Firebug I can see the browser loading the tiles from the source the first time but when loaded a second time it doesn't send a request at all but loads the tiles from some sort of local cache. Even when all caching is disabled in Firefox tiles are still cached locally. The only way to clear the cache is to reload the whole page with ctrl+F5 (only F5 doesn't work). Using php to destroy the session doesn't work either. I've also tried to add a TileManager for the map but it doesn't seem to be active and clearing it does nothing. Then I've tried the CacheWrite control, executing clearCache. Once again, no effect. I've also tried to set html headers cache-control, pragma etc. but the tiles are still cached. Can someone please explain how to control that cache?
Regards
Henrik
More information about the Users
mailing list