Sitecore 8.1 输出缓存未清除

标签 sitecore outputcache sitecore8 sitecore-mvc

我们在使用 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/

相关文章:

sitecore - sitecore 中 item.Axes.GetDescendants() 和 item.Axes.selectitems() 之间的根本区别是什么

asp.net-mvc - 手动输出缓存刷新

sitecore - 引用错误 : scForm is not defined in Sitecore 8

c# - 模板生成器中 sitecore 'source' 字段的查询符号

html - 为字段的下拉列表选项自定义 html 输出

c# - 如何将 VaryByParam 与多个参数一起使用?

php - 了解 If-Modified-Since HTTP header

Sitecore 8.1体验编辑器很慢

forms - Sitecore.Forms.MVC.dll 8.0 到 8.1 删除了类 : FieldModel & SectionModel

Sitecore:值不能为空。参数名称:uri