且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Xpages脱离服务器端缓存

更新时间:2023-11-27 22:39:10

viewState ="nostate"基本上意味着不要在服务器端为此页面存储组件树或作用域变量.这就是为什么您将其用于XAgent,而这些内容将永远不会被部分刷新.

viewState="nostate" basically means don't store the component tree or scoped variables for this page server-side. That's why you use it for XAgents, which will never be partially refreshed.

关键数据是: 1)XPages会话设置为超时的速度.一旦超时,您将丢失状态数据.我认为keepSessionAlive控件在这里没有帮助. 2)是否在浏览器中打开其他选项卡. XPages还有其他属性可以确定存储在内存/磁盘中的页面数.最大值存储在整个浏览器会话中,一旦达到最大值,最早的将从内存中删除,因此出现相同的消息(以及在XAgent上设置nostate的其他原因.

The key data is: 1) How quickly the XPages session is set to timeout. Once that times out, you'll lose state data. I don't think keepSessionAlive control helps here. 2) Whether other tabs are being opened in the browser. There are other XPages properties that determine the number of pages stored in memory / disk. The maximum is stored for the whole browser session and, once you hit the maximum, the earliest is dropped from memory, hence the same message (and the other reason for setting nostate on XAgents.

听起来像是第一个原因.请注意,XPages会话超时和http超时是单独的超时.第一个是当当前会话的状态数据被删除并且是特定于应用程序的(因为每个XPages应用程序都有一个单独的运行时JVM)时,第二个是随后对浏览器的请求将提示进行身份验证.

It sounds like the first is the cause. Note that XPages session timeout and http timeout are separate timeouts. The first is when the state data for the current session is removed and is application-specific (because each XPages app has a separate runtime JVM), the second when a subsequent request to the browser will prompt for authentication.