[mapserver-dev] Cache-control in WMS Requests

Christopher Schmidt crschmidt at metacarta.com
Tue Mar 18 07:38:50 EDT 2008


On Tue, Mar 18, 2008 at 07:52:44AM +0100, Bart van den Eijnden (OSGIS) wrote:
> Hey Paul,
> 
> why not leave this up to the webserver? That's more flexible IMHO. E.g.
> using Apache's mod_headers.

Well, the easiest answer to this is "MapServer knows more about its
requests than Apache does". You can't do caching rules based on query
strings in apache (at least, not easily) so you can't, for example,
cache getmap requests without also caching getcapabilities -- so if
you're routinely changing the number of layers in a dataset, but never
changing the content of those layers, then MapServer can't provide an
accurate caching header.

Then, there's the fact that not everyone uses servers where it's easy to
set caching headers (I've heard a number of complaints that this is hard
under IIS, for example.)

All in all, I think that dumb caching at the level of the webserver is a
great first step, but it's one of the things that a deeper understanding
of the data that you're serving can affect greatly, and that's
information that the webserver doesn't have.

Regards,
-- 
Christopher Schmidt
MetaCarta


More information about the mapserver-dev mailing list