blackbird / magento-2-clean-cloudflare-image-cache
使用Cloudflare API在产品保存时清除图片缓存URL。
1.0.2
2024-03-26 09:40 UTC
Requires
- blackbird/magento-2-clean-product-image-cache: *
- cloudflare/sdk: *
- magento/framework: *
This package is auto-updated.
Last update: 2024-09-26 10:46:30 UTC
README
magento-2-clean-cloudflare-image-cache
此模块依赖于 blackbird/magento-2-clean-product-image-cache
问题:如果更改后的图片URL被Cloudflare缓存,您需要手动在Cloudflare中清除这些URL才能看到新图片。
解决方案:此模块可清除Cloudflare缓存的产品图片。
如何工作
当你在后台保存产品时,它会调用Cloudflare API来清除图片URL缓存。
安装
composer require blackbird/magento-2-clean-cloudflare-image-cache
php bin/magento setup:upgrade
在生产模式下,别忘了重新编译和重新部署静态资源。
配置
在后台的 系统 > 配置 > Blackbird > 清除图片缓存 > Cloudflare
- 邮箱:用于您Cloudflare账户的邮箱
- API密钥:可以在此处找到
- 区域ID:在API部分的概览页面可见 https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/
之后,您只需清除配置缓存,一切就绪!
支持
联系
欲了解更多信息,请通过以下方式联系我们
许可
本项目采用MIT许可 - 有关详细信息,请参阅LICENSE文件。
就是这样!