这不是我见过的问题,通常是“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) 目前,我的 GitHub Webhook 设置为每次主分支上发生推送时部署我的网站。现在,有了用于 CI 的 GitHub Actions,我只想在 GitHub 上的 CI 成功时运行此 Webhook。
我是否可以告诉我的 GitHub Webhook 等待 GitHub 的 CI ,或者我不应该再使用 Webhook,而是在 GitHub 工作流程中管理此行为?
Github Actions是否有DRY方式在多个作业步骤中计算和共享值?
在下面的工作流程yml文件中,回显$ {GITHUB_REF} | cut -d'/'-f3`-$ {GITHUB_SHA}会分多个步骤重复。
name: Test, Build and Deploy
on:
push:
branches:
- master
jobs:
build_and_push:
name: Build and Push
runs-on: ubuntu-latest
steps:
- name: Docker Build
uses: "actions/docker/cli@master"
with:
args: build . --file Dockerfile -t cflynnus/blog:`echo ${GITHUB_REF} | cut -d'/' -f3`-${GITHUB_SHA}
- name: Docker Tag Latest
uses: "actions/docker/cli@master"
with:
args: tag cflynnus/blog:`echo ${GITHUB_REF} | cut -d'/' -f3`-${GITHUB_SHA} cflynnus/blog:latest
Run Code Online (Sandbox Code Playgroud)