刷新 XPages 中的配置文件

发布于 2024-12-05 21:04:23 字数 329 浏览 1 评论 0原文

我在 Lotus Notes 中创建了一个保存布尔值的配置文件文档。然后我创建了一个 XAgent,它以纯文本形式返回值(true 或 false)。问题是:当我在 Lotus Notes 客户端中更改配置文件文档的值时,即使我尝试刷新 XAgent 页面、关闭浏览器或使用其他浏览器,XAgent 也不会返回更改后的值。仅当我在服务器中重新启动 HTTP 任务(“tell http restart”)时,才会出现更改。有没有办法始终立即获取新的文档配置文件值?我已经搜索了几个小时如何以编程方式清除网络服务器缓存等,但没有成功。我知道配置文件不应该经常更改,但我这样做是为了测试。

请帮我。

非常感谢! :D

I created a profile document in Lotus Notes that saves a boolean value. Then I created an XAgent that returns the value as plain text (either true or false). The problem is: when I changed the value of the profile document in the Lotus Notes client, the changed value is not returned by the XAgent even though I tried refreshing the XAgent page, closing the browser or using a different browser. The change appears only when I restart the HTTP task ('tell http restart') in the server. Is there a way to always get the fresh document profile values immediately? I've been searching for hours how to programatically clear the web server cache or the like but to no avail. I know that profile documents are not supposed to be changed frequently, but I;m doing this for testing's sake.

Please help me.

Thank you very much! :D

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

葬シ愛 2024-12-12 21:04:23

您使用的是这样的实际“配置文件”文档吗?

Call workspace.EditProfile("Interest Profile", session.UserName)

配置文件已经存在很长时间了,它们的用法本来就很简单,并不是为了定期更新而设计的。此后,它被误解为流程的通用“草稿本”。

一般来说,我不推荐使用它们,因为 Domino 缓存的配置文件与 HTTP 无关,而且管理起来比较困难。当您的副本分布在其他服务器上时,这尤其困难。

因此,另一种选择是使用普通文档,并通过常规 getdocumentByKey 方法。这使您可以直接管理它们,从而更容易维护。

Are you using an actual "Profile" document like this ?

Call workspace.EditProfile("Interest Profile", session.UserName)

Profile documents have been around for very long time, and their usage was intended to be quite simple, and not designed for regular updating. It has since been mis-interpreted as the general "scratch pad" for processes.

Generally, I do not recommend their usage because Domino cache's profile documents irrespective of HTTP, and they are more awkward to manage. This is especially difficult when you have replicas floating around on other servers.

So, the alternative is to use normal documents, and access them via a regular getdocumentByKey method. This allows you to manage them directly, which in turn makes it easier to maintain.

孤蝉 2024-12-12 21:04:23

出于性能原因,Domino http(和 XPage)引擎会缓存页面和文档。这包括个人资料文件。

一种有效的解决方法是不通过 Notes 客户端,而是通过 Web 代理更新配置文件文档。这样,HTTP 引擎正在运行代理,因此它应该能够识别配置文件已更改并且需要重建其缓存。

另一种解决方法是 - 如果这是仅 Xpages 的解决方案 - 使用 属性文件来存储信息。

除此之外,我能想到的唯一“解决方案”是用“常规”文档和视图重新实现“配置文件文档”。

For performance reasons, the Domino http (and XPages) engine caches pages and documents. And this includes profile documents.

One workaround that would work is to update the profile document not though the Notes Client, but via a Web Agent. This way, the HTTP engine is running the agent, so it should be able to recognize that the profile has changed and that its cache needs to be rebuilt.

Another workaround would be - if this is an Xpages only solution - to use scoped variables and properties files to store the information.

Other than that, the only "solution" I can think of, is to re-implement "profile documents" with "regular" documents and views.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文