Since GeoServer 2.6 does not provide these settings it must have been introduced between 2.6 and 2.10. *Cache-Control: max-age=0, must-revalidate* We use GeoTools out of a webstart application. Since JDK 7 U2 there is the "enhancement": ------ Caching enabled by default: Caching of network content for application code running in Web Start mode is now enabled by default. This allows application improved performance and consistency with applet execution mode. To ensure the latest copy of content is used, the application can use URLConnection.setUseCaches(false) or request header Cache-Control values no-cache/no-store. (http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/enhancements-7.html)
The problem here is, that URLConnection does in fact provide a "cached" copy of a GetCapabilities document. Therefore we do not get informed about new or deleted layers. At the moment I test if it works with global caching disabled (URLConnection.setDefaultUseCaches(false)). So the cache settings should be improved to take URLConnections behaviour into account. Or do I have a configuration option using geoserver? Its a pity, that URLConnections cache settings are not changeable through your SimpleHttpClient interface, which would also help alot. So far I could only see those cache setting making a GetCapabilities request. GetMap requests do not get any Cache-Headers, so no problem. |