如何配置 orbeon 资源的过期日期
我们有 Orbeon 3.8 PE
根据文档,“目前,PFC 提供的资源(即除 XForms 引擎的 CSS 和 JavaScript 资源之外的所有资源)不会自动获得特殊的到期日期。”
我们已经看到过期日期是自下载之日起 15 天后确定的。直到 15 天过去后,浏览器才会请求该组件。
我们想增加天数。
这怎么办?我必须修改什么 jar 或类?
我们不想使用 apache 过期过滤器
We have Orbeon 3.8 PE
According to the documentation, "At the moment, the resources served by the PFC (that is all the resources except the XForms engine's CSS and JavaScript resources) do not automatically get a special expiration date. "
We have seen that the expire date is established 15 days since the day and time it is downloaded. The browser doesn't ask for that component until 15 days have passed.
We want to increase the amount of days.
How can this be done ? What jar or class must I modify?
We don't want to use apache expire filter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
文档似乎不正确,因为我看到代码使用“资源年龄加 10%”的标准 HTTP 启发式。
相关源代码位于 ResourceServer.java, XFormsResourceServer.java 和 ServletExternalContext.java。
请注意,对于版本化资源(在 PE 版本中可用),资源 URL 包含版本号并被积极缓存,因此实际上它们“永远”不会从浏览器中过期(当然,浏览器仍然可以根据需要随时使它们过期)。关于缓存设置)。
更新:实际上,该文档与其说是不正确,不如说是不精确:它的意思是,即使启用了版本化资源,PFC 提供的资源也不会获得遥远的未来设置的到期日期。
然而,自 2011 年 10 月构建以来,此问题已得到修复,并且 PFC 提供的版本化资源在未来很长一段时间内都会过期。现在,如果没有版本化资源,PFC 提供的资源和 XForms 引擎提供的资源都不会在很远的将来设置过期时间。在这种情况下,他们确实遵循“资源寿命加 10%”启发式。这意味着,如果您不使用版本化资源,则必须修改 Orbeon Forms 的源代码(公平地说,我们在这种特定情况下不建议这样做),或者使用过滤器或 Apache 前端。
It seems that the documentation is incorrect, as I see that the code uses the standard HTTP heuristic of the "age of the resource plus 10%".
The relevant source code is in ResourceServer.java, XFormsResourceServer.java, and ServletExternalContext.java.
Note that with versioned resources (available in the PE version), resource URLs include a version number and are aggressively cached, so that in effect they "never" expire from the browser (of course the browser can still expire them any time it wants based on cache settings).
Update: Actually the documentation was more imprecise than incorrect: what it meant to say was that, even with versioned resources enabled, resources served by the PFC did not get an expiration date set far in the future.
However since October 2011 builds, this has been fixed, and versioned resources served by the PFC do expire far in the future. Now without versioned resources, neither resources served by the PFC nor those served by the XForms engine have an expiration set far in the future. In that case, they do follow the "age of the resource plus 10%" heuristic. This means that if you are not using versioned resources, you have to either modify the source code of Orbeon Forms (which to be fair we do not recommend in this specific case), or use a filter or an Apache front-end.