[Geoserver-users] HTTP-Cache headers

Hi List,
I came across this blog post - http://geo-solutions.blogspot.it/2012/05/tips-tricks-geowebcache-tweaks.html - detailing how to change HTTP Caching Headers for GWC responses.

The problem is, its not clear what file I need to edit to put my into. After a bit of searching I decided to stick it into %GWC_CACHE_DIR%\geowebcache.xml:

Problem is, this breaks GeoServer horrifically (tons of error messages at startup, and then any and all GeoServer requests, including to the admin page, give a 404 when its running). I’m surprised how badly GeoServer breaks actually.

So short version: how do I implement this in the GeoServer integrated GWC?

Thanks,
Jonathan

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.

Ciao Jonathan,
answering your email partially. Those tricks were put in place with a
standalone GeoWebCache.

Regards,
Simone Giannecchini

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

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

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

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

On Thu, May 9, 2013 at 4:39 PM, Jonathan Moules
<jonathanmoules@anonymised.com> wrote:

Hi List,
I came across this blog post -
http://geo-solutions.blogspot.it/2012/05/tips-tricks-geowebcache-tweaks.html
- detailing how to change HTTP Caching Headers for GWC responses.

The problem is, its not clear what file I need to edit to put my
<expireClientsList> into. After a bit of searching I decided to stick it
into %GWC_CACHE_DIR%\geowebcache.xml:

  <layers>
  <!--HTTP Cache tiles - 30 days until expiry for mastermap scale-->
  <!--100 days for others-->
<expireClientsList>
<expirationRule minZoom="0" expiration="8640000" />
<expirationRule minZoom="10" expiration="2592000" />
</expireClientsList>
  </layers>

Problem is, this breaks GeoServer horrifically (tons of error messages at
startup, and then any and all GeoServer requests, including to the admin
page, give a 404 when its running). I'm surprised how badly GeoServer breaks
actually.

So short version: how do I implement this in the GeoServer integrated GWC?

Thanks,
Jonathan

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.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Simone,
Thanks for the information. I guess that means the HTTP-Cache headers aren’t configurable with the integrated GWC. Ah well, our internal network can cope. :slight_smile:

Jonathan

On 9 May 2013 19:08, Simone Giannecchini <simone.giannecchini@anonymised.com> wrote:

Ciao Jonathan,
answering your email partially. Those tricks were put in place with a
standalone GeoWebCache.

Regards,
Simone Giannecchini

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

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

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


On Thu, May 9, 2013 at 4:39 PM, Jonathan Moules
<jonathanmoules@anonymised.com> wrote:

Hi List,
I came across this blog post -
http://geo-solutions.blogspot.it/2012/05/tips-tricks-geowebcache-tweaks.html

  • detailing how to change HTTP Caching Headers for GWC responses.

The problem is, its not clear what file I need to edit to put my
into. After a bit of searching I decided to stick it
into %GWC_CACHE_DIR%\geowebcache.xml:

Problem is, this breaks GeoServer horrifically (tons of error messages at
startup, and then any and all GeoServer requests, including to the admin
page, give a 404 when its running). I’m surprised how badly GeoServer breaks
actually.

So short version: how do I implement this in the GeoServer integrated GWC?

Thanks,
Jonathan

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.

Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may


Geoserver-users mailing list
Geoserver-users@lists.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.

Hi Jonathan,

You have a couple of options to set HTTP-Cache headers with the integrated
GWC:

1. Create a tiled layer in geowebcache.xml instead of publishing a
GeoServerTileLayer.
2. If you're using Tomcat you can change the headers using the Expires
Filter :
http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Expires_Filter

Ami.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/HTTP-Cache-headers-tp5052354p5052554.html
Sent from the GeoServer - User mailing list archive at Nabble.com.