有没有办法强制 Sitecore 将 MongoDB 数据与其 SQL 数据库同步?

Is there a way to force Sitecore to sync MongoDB data with it's SQL database?

我正在设置 Sitecore xDB,并试图准确测试经过身份验证和未经过身份验证的用户通过系统获取的信息。我希望能够在 Sitecore 中进行更改并快速查看结果。我找到了将会话生命周期降低到 1 分钟而不是 20 分钟的设置。我还没有找到一种方法来强制 Sitecore 按需或至少在 1-5 分钟内与 Mongo 同步,而不是,似乎也此刻大约20分钟。它是否存在或 "rebuilding" 数据库解释 here 唯一存在的进程?

请参阅 Martina Welander 的博客 post,了解有关 xDB 会话的更多信息:https://mhwelander.net/2016/08/24/whats-in-a-session-what-exactly-happens-during-a-session-and-how-does-the-xdb-know-who-you-are/

您只需要一个调用 System.Web.HttpContext.Current.Session.Abandon() 的实用程序页面。您可能还想将用户重定向到不存在的页面。

更新地址评论

我的理解是,一旦 xDB 会话过期,处理应该迅速进行。在 Sitecore.Analytics.Processing.Services.config 文件中,BackgroundService 代理默认设置为 运行,间隔为 15 秒。

您可能只是看到了缓存的报告数据。尝试使用 /sitecore/admin/cache.aspx 页面清除缓存。您还可以减少 Sitecore.Analytics.Reporting.config 文件中报告 cacheProvider 的 defaultCacheExpiration 设置。默认为 10 分钟。