0

can anyone face issue of GeoWebCache (GWC) tiles automatically getting deleted when a layers style is changed that is associated with group layer. Normally it should not happen like this., but i have tested 2 times and confirmed.

Anyone suggest me for useful documentation, where i can get complete indepth information about Geoserver gwc processing?

3
  • Doesn't it feel like a right thing to do? If you change the style you probably want that your users will get maps with new styles instead of old tiles from the cache.
    – user30184
    Oct 22, 2014 at 10:35
  • Hi Thanks for comment. Its perfectly a right and great thing any user can expect, as gwc will dynamically create tiles. I need confirmations that my observation is correct or not? because i have been using Geoserver since 2009. Never observed gwc tile deletion when style of layer changed. Before this gwc functionality change, we were truncating tilecache and was recreating whenever a layer style has been changed.
    – Hari
    Oct 22, 2014 at 10:58
  • I have no experience on integrated GWC except some small trials so I can't confirm. Standalone GWC naturally does not know to truncate automatically.
    – user30184
    Oct 22, 2014 at 11:05

1 Answer 1

2

Whenever you activate tile caching for a layer or layer group in Geoserver, GeoWebCache will start to cache all requested tiles. As you know you can speed things up for your early users by pre-seeding all important mapsets, zoom levels or areas.

But if you change the tiled layer's basic structure (e.g. by modifying the gridset) or layout (e.g. by switching to another SLD style, or by changing the current SLD style), GWC will delete its current cache and start anew. This is working as expected, it basically assumes that you want to serve the most up do date mapview to your users (don't tile all your stuff if you are still experimenting with different map styles and compositions).

If it wouldn't delete the old data, your users would get a mixture of old tiles from before your changes and new tiles from after your changes, sometimes even bordering each other within one zoom level (and deleting/rerendering old tiles on the fly doesn't make much difference compared to deleting them all at once...).

Regrettably I couldn't find any more on this topic in GeoServer's manual, maybe someone else can add further information?

3
  • I completely agree with @SAnderka. Things are different if you want to change the datasource, leaving the data structure intact: also in this case the tiles would be deleted. I have overcome the problem by 1. copying in a different folder the whole structure folders of the tiles generated; 2. changing the data source; 3. putting back the directories to the right place. Everything worked like a charm! Oct 22, 2014 at 13:35
  • Hi SAnderka, Thankyou for good explanation. I agree that i couldn't find this info on geoserver docs. Any further documentation is available on advanced Geoserver GWC topic?
    – Hari
    Oct 22, 2014 at 13:50
  • I have to admit, we just recently set up a GeoServer in my municipality (I'm an urban planner, with lots (!) of help by a smart IT guy), and most of the documentation is good, but not great. There was a lot of try and error involved, especially when it comes to GWC...
    – SAnderka
    Oct 22, 2014 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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