Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have over 140 layers that need to appear as overlays on basemaps(Google and OSM). My users can pick and choose which layers they want to see and store them in their preferences. While we have built the solution, the performance is very slow. These layers get served with openlayers making WMS calls to GeoServer and Postgres DB.

I tried using GeoWebCache and Tilecache but then realized that they are not all that helpful when I have dynamic layers. The XML definitions of what layers to cache are static.

What are my options here? Is there a way to cache such combinations, or do I take a different route and investigate on HTTP caching with tools like Varnish?

share|improve this question
1  
Please, could give an explanation about what you to mean with 'dynamic layers'? –  dariapra Aug 25 '12 at 19:47
    
Layers are features that portray different aspects of a location. Here is an example/ portrayal of various layers that collectively can be overlayed on a base map thepiazza.org.uk/bb/viewtopic.php?f=21&t=2057. The dynamic layers means you can selectively turn-on or turn-off a layer. –  Ramesh Elaiyavalli Aug 26 '12 at 5:36
    
But why didn't let openlayers perform requests for each layer separatly? So you can cache the layers with geowebcache.... –  Tommaso Sep 13 '12 at 21:17
1  
@Ramesh But do the features themselves change? Because if they don't then I guess you would benefit from a tile cache. –  R.K. Sep 29 '12 at 19:42
add comment

2 Answers 2

up vote 1 down vote accepted

Try using http headers to control the cache in the local browser or caching proxy server and set a shorter time interval such as 5 mins or 15 mins depending on how static your data is. This way you can get some of the benefit of caching and let the http cache or http caching proxy handle the expiry.

share|improve this answer
add comment

If I understood correct your problem is that it is impossible to determine the combination of layers with each request as users can select any of the 140 layers and the client is sending one request for all layers combined (ie not a request for each layer).

In that case you could try fronting your WMS servers with a caching service like MapProxy or Mapcache that can build multi-layer tiles on the fly by assembling individual pre-cached tiles.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.