小编Dan*_*ord的帖子

在发布时停止 EPiServer 清除输出缓存

这不是我见过的问题,通常是“EPiServer 未清除输出缓存”。我正在努力实现相反的目标。每次发布一个页面时,整个缓存都会被删除,并且由于客户端每天发布数次,这令人沮丧。

我正在使用该[ContentOutputCache]属性并尝试httpCacheVaryByCustom在 EPiServer 中实现带有随附计划任务的规则,以便在我们决定将更新捆绑在一起并在预定时间失效时使缓存失效。

我已经测试了这条规则,它的工作原理是:

public override string GetVaryByCustomString(HttpContext context, string custom)
Run Code Online (Sandbox Code Playgroud)

我的印象是,通过使用这种类型的缓存规则,它会在发布/上传媒体时停止 EPiServer 转储我的缓存。

难道没有办法阻止这种情况发生吗?

我通过使用具有相同自定义字符串规则的标准 [OutputCache] 取得了成功,唯一的问题是编辑器将始终看到他们正在编辑的页面的缓存版本。

我在 EPiServer 的 web.config 中的应用程序设置是:

<applicationSettings globalErrorHandling="Off" operationCompatibility="DynamicProperties" uiSafeHtmlTags="b,i,u,br,em,strong,p,a,img,ol,ul,li" disableVersionDeletion="false" 
                     httpCacheability="Public" uiEditorCssPaths="~/assets/css/styles.css, ~/assets/css/editor.css" urlRebaseKind="ToRootRelative" 
                     pageUseBrowserLanguagePreferences="false" uiShowGlobalizationUserInterface="false" subscriptionHandler="EPiServer.Personalization.SubscriptionMail,EPiServer" 
                     uiMaxVersions="20" pageValidateTemplate="false" utilUrl="~/util/" 
                     uiUrl="~/EPiServer/CMS/" httpCacheExpiration="01:00:00"  httpCacheVaryByCustom="invalidateSiteCache" />
Run Code Online (Sandbox Code Playgroud)

caching outputcache episerver

5
推荐指数
1
解决办法
1062
查看次数

EPiServer [ContentOutputCache] - 在管理员登录时停止缓存清除

最近我为我们的一个站点实现了[ContentOutputCache],并且大部分都很棒.当管理员登录CMS时,缓存似乎停止工作.这可能是设计上的.是否有可能阻止这种情况发生?我希望缓存仅在发布内容时刷新.

asp.net-mvc caching episerver

1
推荐指数
1
解决办法
474
查看次数

标签 统计

caching ×2

episerver ×2

asp.net-mvc ×1

outputcache ×1