Hi Gabriel, Thank you for your clarifying response.
I tried to figure out a way to specify values for the parameterFilter in the POST-request, but I was not able to neither guess the right syntax, nor to find an example online. So, thank you for the REST-example. I think I will be able to find an "ok" solution using this feature, because I can "predict" the parameterFilter-values being used for the tile cache. However, to be able to truncate the whole layer, for any parameterFilter-values, would still be very useful. Sure, I can submit an issue for this in the issue tracker. Do you have an issue regarding the work you are doing on the integrated GWC, in order for me to add a reference to this? I assume it won't be too much work implementing this in the standalone GWC when the feature is already implemented in the integrated GS :) Again - thank you for your input. Best regards, Sebjørn Birkeland SEBJØRN SÆTHER BIRKELAND SENIOR CONSULTANT +47 982 19 301 [email protected] | www.bekk.no | open.bekk.no ________________________________________ Fra: Gabriel Roldan [[email protected]] Sendt: 24. januar 2012 19:29 Til: Sebjørn Birkeland Kopi: [email protected] Emne: Re: [Geoserver-users] GeoWebCache: ParameterFilters and truncating cache Hello Sebjorn, sorry for the late reply 2012/1/16 Sebjørn Birkeland <[email protected]>: > Hi, > > I have an issue regarding truncating the cache from GWC when using > parameterFilter for a wmsLayer. I would like to specify a CQL-FILTER when > accessing the layer from the client (OpenLayers), and have therefore defined > the layer with a regexpParameterFilter. See an extract from geowebcache.xml. > As expected, different values for the parameter (here: CQL-FILTER), results > in different tiles being cached on the server. > > The data which the wmsLayer is based on changes on a regular basis, typically > every hour, and after updating the database with new data, we want to > truncate the layer cache in GWC in order to produce new tiles for the > wmsLayer. > > The problem is that when we try to truncate the layer cache, only the tiles > with no/default parameter value for the parameter are invalidated. This means > that all the tiles generated based on different input values for the > parameter are still cached on the server. I expected that all the tiles for > all the different combinations of parameter values should be removed when > truncating the layer. I get the same behaviour when POST-ing a seedRequest, > and when trying to truncate the layer from the GWC web interface. Thus, I am > never able to truncate the whole cache for the layer. > > Truncating the layer cache worked fine before I added the parameterFilter. I > have also verified that when specifying an value for the defined parameter in > the "seed form" in the GWC web module, the tiles for the specified parameter > value are removed from the cache. But I have not succeeded in finding a way > to truncate the complete cache for a layer with parameterFilter. > > - Is this a bug? > - Is there a way to configure GWC / the layer to truncate all tiles for a > layer, regardless of parameterValues, when issuing a truncate request? > - Is it possible to provide some kind of wildcard, or other > parameter/properties, in order to get the wanted behaviour when truncating? My understanding is it is not currently possible to instruct GWC to truncate the tiles for all the parameter filters. So rather than a bug it's a missing capability. You can, however, state which parameter filter combination to truncate on, both through the UI and the REST API. Check the attached file for an example of the contents of a REST call. That said, this week I'm going to commit some improvements to the integrated gwc that do allow to truncate the whole layer, including any parameter filters, in a single call. Would you create an issue for the standalone in the issue tracker to make this possible through the UI/REST calls? <https://github.com/GeoWebCache/geowebcache/issues> Cheers, Gabriel > > Please see below for more detailed information, and let me know if more > details are needed. > I hope someone can help finding a solution for this :) > > Best regards, > Sebjørn Birkeland > BEKK Consulting. > > > GeoWebCache v. 1.2.6, built 2011-04-19 12:23:23 > > Example URL for requesting a tile from the layer: > http://xxxxx:xxxx/xxxxx/geowebcache/service/wms/?LAYERS=vv_road_condition&PROJECTION=EPSG%3A32633&FORMAT=image%2Fpng&REDRAW=true&TRANSPARENT=TRUE&VISIBILITY=true&TIMESTAMP=1326703950481&TILESIZE=w%3D256%2Ch%3D256&CQL_FILTER=%28PROGNOSIS_TIME_STRING%3D%272012-01-16%201200%27%29&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A32633&BBOX=322876.57704665,6587625.5256822,368751.75227405,6633500.7009096&WIDTH=256&HEIGHT=256 > > >From the layer configuration in geowebcache.xml: > <wmsLayer> > <name>vv_road_condition</name> > <mimeFormats> > <string>image/png</string> > </mimeFormats> > <gridSubsets> > <gridSubset> > <gridSetName>EPSG:32633</gridSetName> > </gridSubset> > </gridSubsets> > <wmsUrl> > <string>http://xxxx:xxxx/xxxx/geoserver/wms</string> > </wmsUrl> > <wmsLayers>vegvar:LAST_ROAD_PROGNOSIS_VALUE_VW</wmsLayers> > <expireCacheList> > <expirationRule minZoom="0" expiration="-2"/> > </expireCacheList> > <expireClientsList> > <expirationRule minZoom="0" expiration="-1" /> > </expireClientsList> > <parameterFilters> > <regexParameterFilter> > <key>CQL_FILTER</key> > <defaultValue></defaultValue> > > <regex>^\(PROGNOSIS_TIME_STRING=\'\d{4}-\d{2}-\d{2}\s\d{4}\'\)$</regex> > </regexParameterFilter> > </parameterFilters> > </wmsLayer> > > > -- -- -- > SEBJØRN SÆTHER BIRKELAND > SENIOR CONSULTANT > +47 982 19 301 > [email protected] | www.bekk.no | open.bekk.no > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > _______________________________________________ > Geoserver-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Gabriel Roldan OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
