承接 jorisnoo/craft-cdn-asset-purge 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jorisnoo/craft-cdn-asset-purge

最新稳定版本:1.0.0

Composer 安装命令:

composer require jorisnoo/craft-cdn-asset-purge

包简介

Purge CDN URLs when Craft CMS assets are replaced, renamed, moved, or deleted.

README 文档

README

A Craft CMS module that purges CDN URLs when assets are replaced, renamed, moved, or deleted. Works with Bunny CDN or any other CDN that has a purge API.

Requirements

  • Craft CMS 5.0+
  • PHP 8.2+

Installation

Install via Composer:

composer require jorisnoo/craft-cdn-asset-purge

Register the module in config/app.php:

return [
    'modules' => [
        'cdn-asset-purge' => \Noo\CraftCdnAssetPurge\CdnAssetPurge::class,
    ],
    'bootstrap' => ['cdn-asset-purge'],
];

Configuration

Create config/cdn-asset-purge.php:

<?php

use craft\helpers\App;

return [
    'apiKey' => App::env('CDN_API_KEY'),
    'volumes' => ['images'],
];
Setting Description Default
apiUrl The CDN purge API endpoint https://api.bunny.net/purge
apiKey Your CDN API key
authType Auth header style: access_key or bearer access_key
volumes Asset volume handles to monitor []

Using a custom CDN

Override the API URL and auth type to point at any purge endpoint:

return [
    'apiUrl' => 'https://cdn.example.com/api/cache/purge',
    'apiKey' => App::env('CDN_API_KEY'),
    'authType' => 'bearer',
    'volumes' => ['images'],
];

How it works

When an asset in a monitored volume is replaced, renamed, moved, or deleted, the module pushes a queue job that sends a purge request to the configured API endpoint. The purge happens asynchronously so it doesn't block the control panel.

License

MIT

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固