Cache-Control

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Cache-Control

FreemanUz
I use OpenLayers -> TileCache -> Mapnik Server for my map web-service,
and I faced a problem with caching on the client's side.

Well, in other words, users of my service has to download all static
images again and again, even after scaling during the same session .

I know, that there are some headers in server's response, which
controls browser's caching rules, but I have no idea how to use them.

Acually, map has been cached, and lots of cache images are situated on
my file system, but there is no strait way to get them. You can access
the images only through the tilecache, so I suppose, that headers
should be sent from the tilecache, shouldn't they? And I guess it has
already been thought by tilecache developers...  What exactly should I
do to turn them on?
Reply | Threaded
Open this post in threaded view
|

Re: Cache-Control

Ivan Mincik-2
On Friday 25 June 2010, FreemanUz wrote:
> I use OpenLayers -> TileCache -> Mapnik Server for my map web-service,
> and I faced a problem with caching on the client's side.
>
> Well, in other words, users of my service has to download all static
> images again and again, even after scaling during the same session .

If I understand correctly Your question, You can use Apache mod_expires to set expire.

Example configuration:
        <Directory "/">
                Options -Indexes
                AddHandler python-program .py
                PythonHandler TileCache.Service
                PythonOption TileCacheConfig /etc/tilecache.cfg
                ExpiresActive On
                ExpiresByType image/png "access plus 10 hours"
                ExpiresByType image/jpeg "access plus 14 days"
        </Directory>


>
> I know, that there are some headers in server's response, which
> controls browser's caching rules, but I have no idea how to use them.
>
> Acually, map has been cached, and lots of cache images are situated on
> my file system, but there is no strait way to get them. You can access
> the images only through the tilecache, so I suppose, that headers
> should be sent from the tilecache, shouldn't they? And I guess it has
> already been thought by tilecache developers...  What exactly should I
> do to turn them on?



--
Ivan Mincik
_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: Cache-Control

FreemanUz
Thanks, it's working..
Reply | Threaded
Open this post in threaded view
|

Re: Cache-Control

manel.clos
In addition, tilecache version in Subversion allows you to set a global expire in the cache section

[cache]
...
# 10 minutes
expire=600

May you not be able to modify apache's configuration that would help.


> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre de FreemanUz
> Enviado el: martes, 29 de junio de 2010 7:30
> Para: [hidden email]
> Asunto: [Tilecache] Re: Cache-Control
>
>
> Thanks, it's working..
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Cache-Control-tp5221543
> p5233765.html
> Sent from the TileCache mailing list archive at Nabble.com.
> _______________________________________________
> Tilecache mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/tilecache
>
_______________________________________________
Tilecache mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/tilecache