2

I'm using GeoWebCache and GeoServer to tile cache a layer of data from a SQL Server database. If I seed the cache and I send a tiled WMS request what occurs?

Does GeoServer make a call to SQL Server or are the tiles taken straight from the GeoWebCache? If the underlying SQL server data changes how does GeoServer know to regenerate the relevant tile?

Any help apprciated.

1 Answer 1

4

The idea behind GeoWebCache is that if a tile is available in the cache it will grab it and send it back to the client, it won't even bother making the round trip to your database. So it won't make a call to the SQL Server database unless the tile is not there. The trip to the SQL database is exactly what you are trying to cut out by using GeoWebCache, if it had to keep going back to check if it has changed then you would lose all benefit of it.

All this being said, GeoWebCache does provide a mechanism for setting expiration on tiles. From their intro page (which also has a snazzy diagram showing a high level overview of how GWC works)

GeoWebCache can even be used in the case when maps aren’t completely static, since it allows for the selective expiration of tiles, so that data remains current. In this respect GeoWebCache acts as an all-purpose accelerator for map rendering.

Tile expiration times are set in the geowebcache.xml file. You can read more about how to set this up on their Tile Expiration page. Big note on this though, this is not something I have ever used due to the variation of cache expiration we would need for our 1000+ layers. We just don't use caching for updating layers, or we setup auto deletions of a layers tile cache every week/month/year. So have a look, give it a go and report back to me :)

1
  • 2
    @gisWeeper: In addition to the database calls to get the data, you also have the rendering time for each new tile, which probably causes the greater slow-down. If you seed the cache, the pre-rendered tiles in the cache will be sent to the client, so speeding things up at the client end. Commented Jun 28, 2013 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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