0

我正在运行 orbeon 3.70beta,我需要避免缓存。特别是我需要 orbeon 在 http 响应中返回以下属性:

Cache-Control=max-age=0  
Pragma=no-cache  
Expires=0

我在 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"/>

但我仍然收到这样的回复:

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.

我将非常感谢您的帮助。

谢谢,弗朗西斯科。

4

1 回答 1

0

这些属性是为 Orbeon Forms 4.0 添加的,因此它们不适用于 3.7。(3.7.1 已经超过 3 年了,而您使用的 3.7.0beta 版本可能更老。)最好的办法是使用像UrlRewriteFilter这样的 servlet 过滤器或像 Apache 这样的前端 HTTP 服务器来做到这一点。

于 2012-07-21T16:26:00.953 回答