Cache-control headers are not set on WMS responses
--------------------------------------------------

                 Key: GEOS-4172
                 URL: http://jira.codehaus.org/browse/GEOS-4172
             Project: GeoServer
          Issue Type: Bug
          Components: WMS
    Affects Versions: 2.1-beta1
            Reporter: Arne Kepp
            Assignee: Gabriel Roldán
             Fix For: 2.1-beta2


This is essentially the same thing as GEOS-4170 , assigning to you Gabriel 
because of the recent refactor and since you're the author listed in the file. 
But I can handle the fix if you agree with the chage:

In GetMap.java , 

WebMap run(final GetMapRequest request, WMSMapContext mapContext)

there is a huge loop that loops over the layers in the request, and picks an 
else-if section based on the type.

Basically what the Cache-control header needs is the following in each section 
for the layer type:

 
if(layer.isCachingEnabled()) {
  cachingPossible = cachingPossible && layer.isCachingEnabled();
  if(cachingPossible && layer.getCacheMaxAge() < maxAge) {
    maxAge = layer.getCacheMaxAge();
  }
} else {
  cachingPossible = false;
}

The trouble is that certain layer types get special treatment. So instead of 
repeating this in every type section in the loop, I think we should update the 
isCachingEnabled() and getCacheMaxAge() methods on the layer objects smarter, 
so that we only need this code on the top of the loop, and not repeated for 
every type.

Does this make sense?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to