[Geoserver-users] GWC <expireCacheList>

Hi list

I have a layer that is updated frequently, therefore I would like that
GWC would refresh tiles in order to get latest version of the dataset.

I (wrongly) assumed that this was an automatic behavior when layer is
modified at some extent (by adding/updating/removing features), but
this does not look to be the case, and it seems to me that the only
way to obtain the desired result is by reseeding the layer.

I have been then reading the GWC documentation, and apparently the
<expireCacheList> parameter is what I need to modify.
According to http://geowebcache.org/docs/current/configuration/layers/expiretiles.html:
"The tag <expireCacheList> controls how old a tile may be before it is
fetched again from the server. The default value is 0, which means
never, otherwise it must be specified in seconds."
I would like to change this parameter in order to refresh tiles every
- let's say - 3600 seconds.

Problem here is that I cannot find the geowebcache.xml file in my
server. I am using the GeoServer GWC embebbed version, and the only
file similiar to that one looks to be the data_directory/gwc-gs.xml
(but it has a different structure).
How is it possible to configure the <expireCacheList> tag in the GWC
GeoServer embebbed version?

thanks in advance!
p

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti

Hi Paolo,
If you only want tiles to exist for an hour, is it even worth caching them? Although I guess you’ll see what the cache-hit-rate is on the gwc page ( http://example.com/geoserver/gwc ) which will tell you if it is worth it.

My geowebcache.xml file is in the gwc subdirectory if memory serves. So /geoserver_data_dir/.

You can reconfigure where this is though - http://geowebcache.org/docs/current/configuration/storage.html - which is what I’ve done and it works well.

Regards,
Jonathan

On 30 July 2013 10:35, Paolo Corti <pcorti@anonymised.com> wrote:

Hi list

I have a layer that is updated frequently, therefore I would like that
GWC would refresh tiles in order to get latest version of the dataset.

I (wrongly) assumed that this was an automatic behavior when layer is
modified at some extent (by adding/updating/removing features), but
this does not look to be the case, and it seems to me that the only
way to obtain the desired result is by reseeding the layer.

I have been then reading the GWC documentation, and apparently the
parameter is what I need to modify.
According to http://geowebcache.org/docs/current/configuration/layers/expiretiles.html:
“The tag controls how old a tile may be before it is
fetched again from the server. The default value is 0, which means
never, otherwise it must be specified in seconds.”
I would like to change this parameter in order to refresh tiles every

  • let’s say - 3600 seconds.

Problem here is that I cannot find the geowebcache.xml file in my
server. I am using the GeoServer GWC embebbed version, and the only
file similiar to that one looks to be the data_directory/gwc-gs.xml
(but it has a different structure).
How is it possible to configure the tag in the GWC
GeoServer embebbed version?

thanks in advance!
p


Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti


Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Tue, Jul 30, 2013 at 11:56 AM, Jonathan Moules
<jonathanmoules@anonymised.com> wrote:

Hi Paolo,
   If you only want tiles to exist for an hour, is it even worth caching
them? Although I guess you'll see what the cache-hit-rate is on the gwc page
( http://example.com/geoserver/gwc ) which will tell you if it is worth it.

My geowebcache.xml file is in the gwc subdirectory if memory serves. So
/geoserver_data_dir/.

You can reconfigure where this is though -
http://geowebcache.org/docs/current/configuration/storage.html - which is
what I've done and it works well.

You are right, it does not make sense to modify the expiration time
for all of the layers, and there is not a way for doing that for just
a single layer.
I am ending up with a crontab using REST to reseed just the layers I need.
regards
p

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti

On Tue, Jul 30, 2013 at 11:35 AM, Paolo Corti <pcorti@anonymised.com> wrote:

Hi list

I have a layer that is updated frequently, therefore I would like that
GWC would refresh tiles in order to get latest version of the dataset.

I (wrongly) assumed that this was an automatic behavior when layer is
modified at some extent (by adding/updating/removing features), but
this does not look to be the case, and it seems to me that the only
way to obtain the desired result is by reseeding the layer.

Automatic expiration should happen only if you are editing the layers via
WFS-T,
GeoServer has no way to know the data in the source changed behind its back.
If you are editing via WFS-T and still the tiles are not expired, either
the client
is caching them (due to HTTP expiration headers) or we have a bug

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Automatic expiration should happen only if you are editing the layers via
WFS-T,
GeoServer has no way to know the data in the source changed behind its back.
If you are editing via WFS-T and still the tiles are not expired, either the
client
is caching them (due to HTTP expiration headers) or we have a bug

Hi Andrea,
thanks for this key information: in fact we were updating the layer
with an external tool, not using WFS-T, and we had the described
behavior.
Editing with WFS-T works perfectly.
Thanks a lot
p

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti