[Geoserver-devel] OSCache defaults

Hey Brent, was just investigating options on OSCache.

I found: http://www.opensymphony.com/oscache/wiki/Configuration.html

And this line in features: 'When using both disk caching and memory caching. It is possible to limit the cache size to avoid using too much memory but let disk cache unlimited, resulting in browser style complementary disk cache.'

I think it'd make the most sense to use this, it's what squid's doing, and I think will get us better performance . You do it with:
cache.persistence.overflow.only=true

This has the memory overflow to the disk. We can set something fairly small for the memory size, and tell people to increase it if they want more caching. And it'd probably be good to change to the strategy to LRU - least recently used, so that the default bounds of maps get cached to be super fast with memory.

Another note is that we shouldn't cache WFS responses, just WMS ones, as they're the ones that will benefit from caching. WFS clients all request in different ways. Ideally we might cache wfs requests that ask for all features. And perhaps also only WMS getMap requests.

Also it looks like the settings in the download are not unlimited disk like you thought. I'm fine to set it to that. It also could be nice to give people the option to set the cache in to go to their data_dir. May just need to give instructions on how to do that in the tutorial - advice on how and where to set the location of the cache.

I think we also need to investigate how much oscache is respecting the headers we set, since I have a fear it may just over ride them all. Like we want it so that it looks to the caching times in GeoServer, doesn't just keep them around forever. We'll have to play with it on sigma to test extensively.

Chris

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Yeh I was wondering if it just overwrites the header information for each request. I will set a specific header expire time and see if it is using its own or using the one set by GeoServer.

Good call on the caching of WFS. I will comment it out in the sample web.xml file but leave it in so users know they can use it. Maybe just a note in the documentation will suffice.

I updated the file and uploaded it so the new changes are ready for download.

Brent Owens
(The Open Planning Project)

Chris Holmes wrote:

Hey Brent, was just investigating options on OSCache.

I found: http://www.opensymphony.com/oscache/wiki/Configuration.html

And this line in features: 'When using both disk caching and memory caching. It is possible to limit the cache size to avoid using too much memory but let disk cache unlimited, resulting in browser style complementary disk cache.'

I think it'd make the most sense to use this, it's what squid's doing, and I think will get us better performance . You do it with:
cache.persistence.overflow.only=true

This has the memory overflow to the disk. We can set something fairly small for the memory size, and tell people to increase it if they want more caching. And it'd probably be good to change to the strategy to LRU - least recently used, so that the default bounds of maps get cached to be super fast with memory.

Another note is that we shouldn't cache WFS responses, just WMS ones, as they're the ones that will benefit from caching. WFS clients all request in different ways. Ideally we might cache wfs requests that ask for all features. And perhaps also only WMS getMap requests.

Also it looks like the settings in the download are not unlimited disk like you thought. I'm fine to set it to that. It also could be nice to give people the option to set the cache in to go to their data_dir. May just need to give instructions on how to do that in the tutorial - advice on how and where to set the location of the cache.

I think we also need to investigate how much oscache is respecting the headers we set, since I have a fear it may just over ride them all. Like we want it so that it looks to the caching times in GeoServer, doesn't just keep them around forever. We'll have to play with it on sigma to test extensively.

Chris