I see that my subject is incorrect for this emailed request. It should read
"WMS layer doesn't honor cache control header" or something like that. Any help
will be greatly appreciated.
On Saturday, June 7, 2014 11:02 AM, brad yoo <mild...@yahoo.com> wrote:
I have a web application that uses OpenLayers to display a base map and also
allows users apply or remove specific WMS layers as desired. Everything is
working as expected with the exception of layer caching. My geospatial server
responds with a Last-Modified header, but OpenLayers doesn't send any requests
to the server after the cached tile expires unless I refresh my page first.
For instance, when I first browse to the page using OpenLayers and select a
layer to apply I see the appropriate requests being made and the tiles are
returned. If I wait until they should expire and then toggle the visibility of
the layer off and on again, no requests are made to the server at all until I
refresh the page and reapply the layer. The cache control header Last-Modified
seems to be honored as long as I refresh the page. If I refresh the page and
reapply the WMS layer before the cached tile should expire, I see the request
being made to the server and the
expected 304 response.
Ive tried setting the layer function redraw to true, but then every time I make
the layer visible a request is made with the _OLSALT parameter and the new
request is made to the server. Obviously, this is not the behavior I want. When
I toggle visibility on, I always want OpenLayers to make a request to the
server with the If-Modified-Since header. Is there a way to achieve this
expected behavior? What am I missing?
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users