[Tilecache] Cache-Control

Ivan Mincik ivan.mincik at gista.sk
Mon Jun 28 02:09:41 EDT 2010


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


More information about the Tilecache mailing list