在进行内容更改并发布时,通常需要 5 到 10 分钟才能看到更改。
我尝试在 web.config 中更改一些调度代理时间,但这并没有改变任何东西。
您需要将站点名称添加到 web.config 或 /App_Config/Include/ 文件夹中的 SiteDefinition.config 中的 HtmlCacheClearer publish:end 事件。
<event name="publish:end">
<handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
<sites hint="list">
<site>website1</site>
<site>website1</site>
</sites>
</handler>
</event>
此事件在发布后触发,它会清除 Sitecore HTML 缓存。如果未清除此缓存,则在 app_pool 被回收或手动或通过调度程序清除缓存之前,您不会看到您的更改。
如果您使用分离的 CMS 和 ContentDelivery 服务器,您还需要publish:end:remote
具有相同站点的事件。
我设法通过降低以下内容来缩短发布和可见性之间的时间:
<!-- Time between checking for scheduled tasks waiting to execute -->
<frequency>00:00:10</frequency> <!-- 00:05:00 -->
和
<agent type="Sitecore.Tasks.DatabaseAgent" method="Run" interval="00:00:30"> <!-- 00:10:00 -->
<param desc="database">core</param>
<param desc="schedule root">/sitecore/system/tasks/schedules</param>
<LogActivity>true</LogActivity>
</agent>