0
我正在运行orbeon 3.70beta,我需要避免缓存。特别是我需要orbeon在HTTP响应返回以下属性:Orbeon缓存标头
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.
非常感谢您的帮助。
谢谢, 弗朗西斯科。
嗨! 非常感谢您的回复。 **我认为过滤器不是一个选项,因为我自己做了一个**,它没有工作。如果我在处理之前(在chain.doFilter(...))orbeon之前放置过滤器,并覆盖这些参数,并且如果我将它放在后面,或者已经将标头刷新到客户端并提示错误。你认为我错过了什么,我可以用这种方法吗? **我会更新到4.0 **,并希望它向下兼容我的3.7形式:)。 非常感谢! – panox 2012-07-23 13:57:02
我意识到orbeon 4.0没有property.xml而orbeon 3.7没有。这是否会影响行为?包含3.7到4.0定义的属性是一个好主意?使其向后兼容。 – panox 2012-07-23 14:32:29
你正在寻找的是'properties-local.xml'。请参阅[doc](http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties)。 – ebruchez 2012-07-23 15:58:17