Hi Kevin

On Wed, Jul 16, 2014 at 12:30 AM, Kevin Smith <ksm...@boundlessgeo.com> wrote:
>
> The paragraph at the end is important:
>
> > If a request is made using any of the above parameters, the request will be 
> > passed to GeoServer, unless a parameter filter has been set up, in which 
> > case GeoWebCache will process the request.
>
> You need to add a parameter filter to let GWC know that it can cache based on 
> that parameter and what values to allow.
>

thanks for the explanation, I have figured out it just some minutes
after writing the email reading the doc, as always :)

> You can check the headers of the response to see if GWC handled it.  If you 
> see geowebcache-cache-result then GWC handled the tile, it may have a value 
> of HIT or MISS.  If you make the same request again, then the result should 
> always be HIT if caching is working.
>

What I am trying to accomplish is to have a different cached tileset
for each different value of a field.
Just to make it more easy to understand: I have a layer named
hotspots, with a iso3 field containing the country code.
Now I would like to generate a different cache for each different
country code, readed from the CQL_FILTER parameter in the request.

I created a CQL_FILTER for the layer, using the 'list of strings'
choice (though I guess it would be possible to use the 'Regular
expression', but for now I am just testing).
As a default I have added ISO3='USA', and as allowed strings I have added:

ISO3='ITA'
ISO3='GER'
ISO3='FRA'
...

Now when sending a request like this:

LAYERS=hotspots&STYLES=&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&CQL_FILTER=ISO3='USA'&BBOX=-150.66830366504,-54.559164505859,214.14413666504,87.575552505859&WIDTH=847&HEIGHT=330&tiled=true

the tile is not generated by GWC, but from GeoServer WMS, as suggested
by the response header:

geowebcache-cache-result MISS
geowebcache-miss-reason no parameter filter exists for FILTER

I am pretty sure I am wrongly defining the filter, but I could not
find any sample so if you have an hint it would be greatly
appreciated.

regards
p

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

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to