[Geoserver-users] Avoiding invalidation of GeoWebCache tiles

Hi all,

I’d like to update data and styles in a certain instance of GeoServer without the GeoWebCache tiles we’ve seeded being invalidated.

I just want to keep serving the old tiles until I decide to manually reseed.

Is there a configuration option, or another method, for turning off the auto-invalidate functionality?

Cheers,
Chris

Chris,

there are a few things you can do using the geowebcache.xml:

in the
<wmsLayer> tag

usual tags such as name/title/mimeFormats/gridsets/

<wmsUrl> <string>http://my_geowebcache_server/</string> </wmsUrl>

You cannot leave the wmsURL tag out BUT ..

O.k. that is a bit harsh, I admit

but also:
<expireCache>0</expireCache>

or scale level-specific <expireCacheList>-2</expireCacheList>

and
<cacheBypassAllowed>false</cacheBypassAllowed>

</wmsLayer>

In geoserver I don't know what happens if you set the cache to 0.
But you could also (again a rather radical means) disable the database.

In the web.xml:
<context-param>
    <param-name>GWC_METASTORE_DISABLED</param-name>
    <param-value>TRUE</param-value>
  </context-param>

You might do the seceond one as well as your cache will stay the same size.
  <context-param>
    <param-name>GWC_DISKQUOTA_DISABLED</param-name>
    <param-value>TRUE</param-value>
  </context-param>
No database hence no clue when to expire. They work in geoserver too as you
get the message:
"Disk Quota has been disabled through the GWC_DISKQUOTA_DISABLED=true
environment variable/servlet context parameter/JVM argument, so this
configuration page is not operational."

Again this is also a rather radical measure.

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department of Sustainability and Environment
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Avoiding-invalidation-of-GeoWebCache-tiles-tp5082109p5082115.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Mon, Oct 7, 2013 at 3:05 AM, Chris Berkhout <chrisberkhout@anonymised.com>wrote:

Hi all,

I'd like to update data and styles in a certain instance of GeoServer
without the GeoWebCache tiles we've seeded being invalidated.

I just want to keep serving the old tiles until I decide to manually
reseed.

Is there a configuration option, or another method, for turning off the
auto-invalidate functionality?

I don't believe there is a way, when GWC is integrated in GeoServer it gets
notified of changes to the styles
immediately, and there is no way to stop it.

What's the use case for stopping this behavior though? The moment you do a
change in the styles
the tile cache is effectively stale, it must be dropped...

I can think of optimizations in case the style has scale dependencies, and
see if we can compare the
old and new styles and only drop the zoom levels that were actually
affected.

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

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

Hi Andrea,

I think there would be a use case. If you tile a layer you would do it for a
number of reasons: it is frequently called, you want to speed up your server
and/or want to relieve the database server or - which would be the most
common reason - you want to provide a basemap. In that case you want to
check the style in conjunction with others until you are satisfied that they
work together. Or, if you have a data custodian model like we have and the
custodian says I want the feature green you would need to convince him/her
that it isn't a good idea because something else is already green on the map
and might be mixed up with his feature. In that case you would want or need
to wait until this check is done.

Good enough reason?

Cheers

Christian

-----
____________________________

Dr Christian Maul
Project Manager

Information Services Branch
Department Environment and Primary Industries
Level13, Marland House, 570 Bourke Street
Melbourne 3000

PO Box 500, East Melbourne Vic 3002

Telephone: +61-3-8636 2325
Telefax: +61-3-8636 2813
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Avoiding-invalidation-of-GeoWebCache-tiles-tp5082109p5082267.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi All,
I may be misunderstanding this issue, but my own TMS tiles don’t expire when I alter a SLD that is a component for them. I have “Enable direct integration with GeoServer WMS” disabled, but am using the TMS aspect (which is obviously enabled).

If I alter a SLD then new tiles will use it, but the old tiles will still be unchanged.

But my layers are nested several layergroups down from the TMS layer itself:

Mastermap Layer → “MasterMap LayerGroup” → “Vector Basemap Layer Group”

It’s the “Vector Basemap Layer Group” that the TMS calls.

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.

···

Is this behaviour incorrect then?

Cheers,
Jonathan

On 7 October 2013 10:07, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Mon, Oct 7, 2013 at 3:05 AM, Chris Berkhout <chrisberkhout@anonymised.com> wrote:


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk


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

Hi all,

I’d like to update data and styles in a certain instance of GeoServer without the GeoWebCache tiles we’ve seeded being invalidated.

I just want to keep serving the old tiles until I decide to manually reseed.

Is there a configuration option, or another method, for turning off the auto-invalidate functionality?

I don’t believe there is a way, when GWC is integrated in GeoServer it gets notified of changes to the styles
immediately, and there is no way to stop it.

What’s the use case for stopping this behavior though? The moment you do a change in the styles
the tile cache is effectively stale, it must be dropped…

I can think of optimizations in case the style has scale dependencies, and see if we can compare the
old and new styles and only drop the zoom levels that were actually affected.

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


On Tue, Oct 8, 2013 at 12:21 PM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi All,
I may be misunderstanding this issue, but my own TMS tiles don't expire
when I alter a SLD that is a component for them. I have "Enable direct
integration with GeoServer WMS" disabled, but am using the TMS aspect
(which is obviously enabled).

If I alter a SLD then new tiles will use it, but the old tiles will still
be unchanged.

But my layers are nested several layergroups down from the TMS layer
itself:

Mastermap Layer -> "MasterMap LayerGroup" -> "Vector Basemap Layer Group"

It's the "Vector Basemap Layer Group" that the TMS calls.

Is this behaviour incorrect then?

I believe it is. Probably the code fails to relate the change in style
contents with the layer groups that
contain it... which is much more likely if you have them nested, given that
nesting is a recently added feature
in GeoServer

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

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

Reported as http://jira.codehaus.org/browse/GEOS-6081

Personally I prefer this behaviour - Recreating the tiles takes a while and a lot of processing power and I’d prefer to do it on my time.

Cheers,
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.

···

On 8 October 2013 11:24, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Tue, Oct 8, 2013 at 12:21 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Hi All,
I may be misunderstanding this issue, but my own TMS tiles don’t expire when I alter a SLD that is a component for them. I have “Enable direct integration with GeoServer WMS” disabled, but am using the TMS aspect (which is obviously enabled).

If I alter a SLD then new tiles will use it, but the old tiles will still be unchanged.

But my layers are nested several layergroups down from the TMS layer itself:

Mastermap Layer → “MasterMap LayerGroup” → “Vector Basemap Layer Group”

It’s the “Vector Basemap Layer Group” that the TMS calls.

I believe it is. Probably the code fails to relate the change in style contents with the layer groups that
contain it… which is much more likely if you have them nested, given that nesting is a recently added feature
in GeoServer

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


Is this behaviour incorrect then?

On Tue, Oct 8, 2013 at 3:18 AM, cmaul <Christian.Maul@anonymised.com>wrote:

Hi Andrea,

I think there would be a use case. If you tile a layer you would do it for
a
number of reasons: it is frequently called, you want to speed up your
server
and/or want to relieve the database server or - which would be the most
common reason - you want to provide a basemap. In that case you want to
check the style in conjunction with others until you are satisfied that
they
work together. Or, if you have a data custodian model like we have and the
custodian says I want the feature green you would need to convince him/her
that it isn't a good idea because something else is already green on the
map
and might be mixed up with his feature. In that case you would want or need
to wait until this check is done.

Good enough reason?

I believe so, yes. Now, as usual, the issue is finding resources to turn
the idea into working code

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

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

Thanks for the answers!

I’ve added a minor improvement ticket for this:

“Configuration option to NOT invalidate GWC tiles when style or structural changes happen”

http://jira.codehaus.org/browse/GEOS-6095

Unfortunately, we’re not in a position to do development on it at the moment. Maybe one day.

Cheers,
Chris

···

On Wed, Oct 9, 2013 at 12:52 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Tue, Oct 8, 2013 at 3:18 AM, cmaul <Christian.Maul@anonymised.com> wrote:


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk


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

Hi Andrea,

I think there would be a use case. If you tile a layer you would do it for a
number of reasons: it is frequently called, you want to speed up your server
and/or want to relieve the database server or - which would be the most
common reason - you want to provide a basemap. In that case you want to
check the style in conjunction with others until you are satisfied that they
work together. Or, if you have a data custodian model like we have and the
custodian says I want the feature green you would need to convince him/her
that it isn’t a good idea because something else is already green on the map
and might be mixed up with his feature. In that case you would want or need
to wait until this check is done.

Good enough reason?

I believe so, yes. Now, as usual, the issue is finding resources to turn the idea into working code

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


In the interim (which will probably be a long time), you can just create a couple of layers of layergroups and nest it to get the same functionality. :slight_smile:

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 16 October 2013 06:37, Chris Berkhout <chrisberkhout@anonymised.com> wrote:

Thanks for the answers!

I’ve added a minor improvement ticket for this:

“Configuration option to NOT invalidate GWC tiles when style or structural changes happen”

http://jira.codehaus.org/browse/GEOS-6095

Unfortunately, we’re not in a position to do development on it at the moment. Maybe one day.

Cheers,
Chris


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk


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

On Wed, Oct 9, 2013 at 12:52 AM, Andrea Aime <andrea.aime@anonymised.com7…> wrote:

On Tue, Oct 8, 2013 at 3:18 AM, cmaul <Christian.Maul@anonymised.com> wrote:


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk


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

Hi Andrea,

I think there would be a use case. If you tile a layer you would do it for a
number of reasons: it is frequently called, you want to speed up your server
and/or want to relieve the database server or - which would be the most
common reason - you want to provide a basemap. In that case you want to
check the style in conjunction with others until you are satisfied that they
work together. Or, if you have a data custodian model like we have and the
custodian says I want the feature green you would need to convince him/her
that it isn’t a good idea because something else is already green on the map
and might be mixed up with his feature. In that case you would want or need
to wait until this check is done.

Good enough reason?

I believe so, yes. Now, as usual, the issue is finding resources to turn the idea into working code

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