I’m running orbeon 3.70beta and I need to avoid cache. In particular I need orbeon to return in the http response the following attributes:
Cache-Control=max-age=0
Pragma=no-cache
Expires=0
I tried this properties on the properties.xml :
<property as="xs:string"
name="oxf.http.page.cache-headers"
value="Cache-Control: max-age=0; Pragma: no-cache; Expires: 0"/>
<property as="xs:string"
name="oxf.http.resource.cache-headers"
value="Cache-Control: max-age=0; Pragma: no-cache; Expires: 0"/>
But I’m still getting a response like this:
Cache-Control:public
Content-Language:en-US
Content-Length:772
Content-Type:text/html; charset=utf-8
Date:Fri, 20 Jul 2012 13:14:18 GMT
Expires:Fri, 20 Jul 2012 13:14:18 GMT
Last-Modified:Fri, 20 Jul 2012 13:00:51 GMT
Pragma:
Server:WebSphere Application Server/6.1
Note:
Also I add a filter in the web.xml and add the compiled filter but it
seems that orbeon is overriding the cache headers in some point.
Note2:
I already override the cache headers on other application (using a filter) in the
same websphere and the headers are successfully overridden. So the Websphere
is not the problem.
I will appreciate the help very much.
Thanks,
Francisco.
These properties were added for Orbeon Forms 4.0 so they won’t work with 3.7. (3.7.1 is more than 3 years old, and the 3.7.0beta build you are using is probably even older.) Your best bet is to do this by using a servlet filter like UrlRewriteFilter or a front-end HTTP server like Apache.