[mapserver-dev] Cache-control in WMS Requests

Paul Ramsey pramsey at cleverelephant.ca
Tue Mar 18 13:43:50 EDT 2008


For reasons of "user ease" having things like this configured in one
place is handy ("how do I improve my Openlayers performance?" "add
this one line"). I'm going to test this morning though, and see how
much difference this one header makes to browsers in terms of actual
caching behavior (they might ignore the header because the URL is
"cgi-shaped", etc, etc).  Unfortunately the rest of the headers that
affect caching (last modified, etag, etc) are probably off the table,
since they can't be tracked properly in a dynamic environment.

P.

On 3/18/08, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> 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
>
> _______________________________________________
>  mapserver-dev mailing list
>  mapserver-dev at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>


More information about the mapserver-dev mailing list