ItinerisLtd.trellis_purge_kinsta_cache_during_deploy

在部署期间清除 Kinsta 缓存的 Trellis

GitHub 标签 许可证

Trellis 部署 Bedrock 时清除 Kinsta 缓存。

要求

安装

将此角色添加到 galaxy.yml

# galaxy.yml
- src: https://github.com/ItinerisLtd/trellis-purge-kinsta-cache-during-deploy
  version: x.x.x # 检查最新版本!

运行命令:

trellis galaxy install

# 或者
ansible-galaxy install -r galaxy.yml --force

角色变量

将此角色添加到 deploy_after 钩子

# group_vars/all/deploy-hooks.yml
# 了解更多请访问 https://roots.io/trellis/docs/deploys/#hooks
deploy_after:
  - "{{ playbook_dir }}/vendor/roles/trellis-purge-kinsta-cache-during-deploy/tasks/main.yml"

使用

像往常一样进行 部署。无需特别操作。

常见问题

如何清除 Kinsta 缓存?

通过在部署过程中调用 wp kinsta cache purgewp kinsta cache purge --object

为什么忽略错误?

自 v0.4.0 以来,此角色会忽略 wp kinsta cache purgewp kinsta cache purge --object 的错误。这是因为这两个命令会触发对 localhost 的 HTTP 请求,可能会引发 429 too many requests 错误。

Kinsta 支持拒绝将 localhost 请求列入白名单以绕过速率限制。

它会清除 Kinsta CDN 缓存吗?

不会。

不幸的是,目前没有办法通过命令行清除 [Kinsta CDN] 缓存。

我们正在内部讨论中,开发人员也在努力寻找解决方案,但目前我们没有预计的时间或是否能够实现的消息。

-- Kinsta 支持

另见

测试

语法检查

➜ ansible-playbook -i 'localhost,' --syntax-check tests/test.yml

作者信息

trellis-purge-kinsta-cache-during-deployItineris Limited 的项目,由 Tang Rufus 创建。

特别感谢 Roots 团队,是他们的 Trellis 使这个项目成为可能。

完整的贡献者列表可以在 这里 查阅。

反馈

请提供反馈! 我们希望这个库在尽可能多的项目中有用。 请提交一个 问题,告诉我们你的看法,或者分叉这个项目并提出建议。 没有问题是太小的。

更新日志

请参见 CHANGELOG 以获取最近更改的更多信息。

许可证

trellis-purge-kinsta-cache-during-deploy 根据 MIT 许可证 发布。

关于项目

Purge Kinsta cache when Trellis deploys Bedrock

安装
ansible-galaxy install ItinerisLtd.trellis_purge_kinsta_cache_during_deploy
许可证
mit
下载
42.9k
拥有者
We’re a full-service digital marketing agency that partners with ambitious clients to help them grow