Opened 15 years ago
Closed 15 years ago
#2551 closed enhancement (fixed)
WMS option for Cache-control max-age
Reported by: | pramsey | Owned by: | tomkralidis |
---|---|---|---|
Priority: | normal | Milestone: | 5.2 release |
Component: | WMS Server | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: |
Description
The attached patch allows users to set the Cache-control: max-age value returned which each map image to a value in seconds, using "http_max_age" "nnn" in the WEB METADATA object. This should provide some speed advantages for tiled clients like openlayers that always access the same WMS GetMap URLs.
See http://www.mnot.net/cache_docs/ for a good primer.
Attachments (1)
Change History (7)
by , 15 years ago
Attachment: | mapwms-http.patch added |
---|
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Milestone: | FUTURE → 5.2 release |
---|
comment:3 by , 15 years ago
As it stands now, Mapserver is only exercised in a cacheable way via the WMS interface, hence the single insertion in mapwms.c. However, if in the future people begin using the standard CGI interface for pulling tiles, this parameter would also be usable by mapserv.c. Flip a coin, I really don't know the answer. I guess YAGNI says that we should do what makes sense for the present use, and that's to treat it like a WMS parameter.
comment:4 by , 15 years ago
Done:
- trunk in r7461
- updated WMS Server howto (in WEB metadata) http://mapserver.gis.umn.edu/docs/howto/wms_server
Note that the metadata directive is called "wms_http_max_age" or "ows_http_max_age" (code searches in that order).
Paul: please double check and close this ticket if all looks good.
comment:6 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Verified, wms_http_max_age works and returns the right headers.
Paul: thanks for this.
Before I commit, I want to clarify usage and documentation.
Is this a WMS Server only metadata directive (assuming yes). If yes, then I would like to change:
to:
Or, if you see this as something which could, over time, be used in more than WMS Server, maybe we should define this as a pure mapfile MAP/WEB/METADATA object, and use:
..as you originally posted in your patch.
Comments?