[Tilecache] Expire setting on layers
manel.clos at ajgirona.cat
manel.clos at ajgirona.cat
Mon May 24 03:49:59 EDT 2010
Thanks Mark!
I've tried a quick modification of the wsgiHandler and it works:
...
if format.startswith("image/"):
if service.cache.sendfile:
headers.append(('X-SendFile', image))
layer_expire = None
if fields.has_key('layers') or fields.has_key('LAYERS'):
layers = fields.get('layers', fields.get('LAYERS'))
# single layers only
if not ',' in layers:
layer = service.layers[layers]
if layer.expire:
layer_expire = long(layer.expire)
headers.append(('Expires', email.Utils.formatdate(time.time() + layer_expire, False, True)))
if service.cache.expire and not layer_expire:
headers.append(('Expires', email.Utils.formatdate(time.time() + service.cache.expire, False, True)))
...
Would a patch be accepted? Perhaps with a different approach?
> -----Mensaje original-----
> De: Mark Deneen [mailto:mdeneen+tiles at saucontech.com]
> Enviado el: jueves, 20 de mayo de 2010 18:04
> Para: Clos Crespo, Manel
> CC: tilecache at lists.osgeo.org
> Asunto: Re: [Tilecache] Expire setting on layers
>
> Manel,
>
> It was not needed at the time. I'll be honest; I'm only
> using a single layer here. :)
>
> Best Regards,
> Mark Deneen
> Saucon Technologies
>
> ----- "manel clos" <manel.clos at ajgirona.cat> wrote:
>
> > Hi all,
> >
> > I tried the "expire" setting today and it rocks. I would like to set
> > it on a per Layer basis though... Was this a design decission or was
> > just not needed at that time?
> >
> > I think this is the original post, although I tried the version from
> > trunk:
> >
> http://osgeo-org.1803224.n2.nabble.com/PATCH-X-SendFile-and-Ex
> pires-headers-td3771732.html#a3771732
> >
> >
> >
> > Manel Clos
> > UMAT - 972419417
> > Ajuntament de Girona
>
More information about the Tilecache
mailing list