Closed cholmes closed 11 years ago
This is now on dev, ready for testing.
So this appears to be working great on layers with smaller number of time series, like http://mapstory.dev.opengeo.org/maps/223 I assume this is all the openlayers new caching code working. Once you play through the layer once then it doesn't ask for any additional server requests, just plays along beautifully.
If you do one with more time series though it continues to ask for more tiles after one play through. See http://mapstory.dev.opengeo.org/maps/147 or http://mapstory.dev.opengeo.org/data/geonode:Post_Offices0 I assume this is because the first tiles are getting expelled from the cache. But there was a bit of time on dev where we had GWC working proper with cache control headers. So that on the second play through it wouldn't be the dom cache, but would be the browser cache.
Hrm, actually post offices works on firefox with no further requests, though the first one, the earthquake map, doesn't on firefox. Both start asking for more requests on chrome. So I assume firefox has a bigger browser cache?
Anyways, I'd assume that on second play through of those they'd be getting 304 not modifieds from the server. That's how things were working before the openlayers caching code.
FYI the DOM cache size is set to 512 images currently.
Hrm, this may be more for @ischneider
Digging in to it indicates to me that GWC isn't caching at all, it's getting misses.
I get headers of:
Date: Thu, 31 Jan 2013 15:27:00 GMT Server: Apache-Coyote/1.1 geowebcache-miss-reason: no parameter filter exists for TIME geowebcache-cache-result: MISS Content-Disposition: inline; filename=geonode-Post_Offices0.png Content-Type: image/png Via: 1.1 mapstory.dev.opengeo.org Keep-Alive: timeout=15, max=72 Connection: Keep-Alive Transfer-Encoding: chunked
200 OK
I get
geowebcache-miss-reason: not a tile layer geowebcache-cache-result: MISS
Ian, was there some change that made it so GWC isn't caching the time layers? Also is the max-age stuff on there? It'd be nice to play some with that, especially on the viewer. Have the browser not even have to ask the server if things changed.
That makes a lot of sense, that's about the number where requests start being asked again. I think we should keep it the same, and tap in to the next level of caching for things bigger than that, using the browser cache.
thanks for checking all this out @cholmes
regarding the 'not a tile layer' issue: new layers will be configured using the REST API. Old layers have to be 'updated' still. Some layers have been manually configured. I do need to create/ensure the migration code works well and run it so we're not spending time wondering why it's not activated. Apologies for any confusion.
I configured the EQ_and_TS layer and added an expires rule. I'm not seeing the max-age headers either so I'll have to look into that. The hacky patch may have not been deployed or it may have been overwritten.
The client-based caching stuff seems to be working pretty nice :8ball:
This is all deployed to production now, with a bit of a hiccup with gwc on amazon opening random ports.
We need to get the nice caching stuff that's on mapstory dev rolled out, so stories play much better.
Can take time with this, to try to fully learn the codebase, so it's easier to improve. Feel free to use Ivan to help on this if needed.