On Sun, Feb 12, 2012 at 3:19 PM, John Armstrong <[email protected]> wrote:

> On 02/12/2012 12:40 PM, Gabriel Roldan wrote:
>
>> If you are using a TIME parameter in your request, the only way the GWC
>> mediator said it does match a tile cache is if you have a parameter
>> filter[1] for the TIME parameter keyword configured for the layer.
>>
>
> Okay, this makes sense with the code I'm seeing, and I've been trying to
> figure out how to set such a parameter filter on one of my layers.
>
>
>  Check GWC.isCachingPossible(**TileLayer, GetMapRequest):
>>
>>    if (null != request.getTime() && !request.getTime().isEmpty()) {
>>        if (!filterApplies(filters, request, "TIME",
>> requestMistmatchTarget)) {
>>            return false;
>>        }
>>    }
>>
>> If that's not working, then report the bug back here please.
>>
>
> I don't see this method; our current geoserver is version 2.1.2, so I've
> been going off of its code.  Is this new since then?


It looks like it is there in 2.1.2: <
http://svn.codehaus.org/geoserver/tags/2.1.2/src/gwc/src/main/java/org/geoserver/gwc/GWC.java
>


>
>
>  Now, at the current state of the gwc integration, you can't configure a
>> parameter filter for an embedded geoserver layer. What you can do is to
>> configure a wmsLayer in <data dir>/gwc/geowebcache.xml, name it something
>> different than the geoserver layer (eg, "states" instead of "topp:states"),
>> make it point to the geoserver layer you want to cache, and configure a
>> parameter filter for time (this is about to change in the very near future.
>> You'll be able to configure these and other caching properties through the
>> geoserver UI, and enabling parameter filters for STYLES, TIME, and
>> ELEVATION will be as simple as a checkbox).
>>
>
> Okay, so to check if I've got this: I can't set this up directly on my own
> layer.  What I have to do is set up a GWC layer that's backed by my own
> layer and which does take a TIME filter, and then point OpenLayers to that.
>  Right?

Right.


>
>
>  As Andrea mentioned, building a tile cache for all your TIME values might
>> lead to a huge cache. Although you don't need to pre-seed them all. You can
>> rather let the cache being built on demand, and set up the disk quota limit
>> so that gwc cleans up less recently/frequently used tiles up to a disk
>> quota usage limit.
>>
>
> Oh, yes, we're not pre-seeding the whole thing. We just want caching to
> speed up repeated access to recently-viewed tiles.
>

See the other reply, you may want to combine with disk quota and min/max
cached zoom levels (available on nightlies, or wait for the next release).

Cheers,
Gabriel

>
> Thanks again for your help.  If I've understood you I think I can make
> this work.
>



-- 
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to