我们在使用 ASP.NET MVC 编写的 Azure Web Apps 托管的不同服务器上拥有 CA 和 CD。
我在下面添加了内容,以便在发布结束时清除输出缓存。
<event name="indexing:end:remote">
<handler type="Sitecore.ContentSearch.Maintenance.IndexDependentHtmlCacheManager, Sitecore.ContentSearch" method="Clear"/>
</event>
但是,输出缓存不会被清除,网站内容也不会被更新。
在上述基础上我还需要进行任何配置吗?
谢谢。
最佳答案
您可能缺少可扩展性设置。由于这些是不同的服务器,因此您的 CD 需要知道将发布哪个服务器 (Publishing.PublishingInstance)。这样它就可以读取远程发布事件并适当触发。
请参阅 App_Config\Include 文件夹中的“ScalabilitySettings.config.example”。
<!-- INSTANCE NAME
Unique name for Sitecore instance.
Default value: (machine name and IIS site name)
-->
<setting name="InstanceName">
<patch:attribute name="value"></patch:attribute>
</setting>
<!-- PUBLISHING INSTANCE
Assigns the instance name of dedicated Sitecore installation for publishing operations.
When empty, all publishing operations are performed on the local installation of Sitecore.
Default vaue: (empty)
-->
<setting name="Publishing.PublishingInstance">
<patch:attribute name="value"></patch:attribute>
</setting>
正如 @Wesley Lomax 指出的那样,您还需要在远程发布上为您的网站运行 HTML Cache Clearer:Content does not reflect on CD server after publishing from CM server
关于Sitecore 8.1 输出缓存未清除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33803183/