PHPackages                             jorisnoo/craft-blitz-bunny-purge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. jorisnoo/craft-blitz-bunny-purge

ActiveCraft-plugin[Caching](/categories/caching)

jorisnoo/craft-blitz-bunny-purge
================================

Bunny CDN reverse proxy purger for the Blitz Craft CMS plugin.

0.1.0(2mo ago)07↓100%[1 PRs](https://github.com/jorisnoo/craft-blitz-bunny-purge/pulls)MITPHPPHP ^8.2

Since Mar 10Pushed 2mo agoCompare

[ Source](https://github.com/jorisnoo/craft-blitz-bunny-purge)[ Packagist](https://packagist.org/packages/jorisnoo/craft-blitz-bunny-purge)[ Docs](https://github.com/jorisnoo/craft-blitz-bunny-purge)[ RSS](/packages/jorisnoo-craft-blitz-bunny-purge/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Blitz Bunny Purge
=================

[](#blitz-bunny-purge)

A [Craft CMS](https://craftcms.com) plugin that provides a [Bunny CDN](https://bunny.net) reverse proxy purger for the [Blitz](https://putyourlightson.com/plugins/blitz) caching plugin.

When Blitz invalidates cached content, this purger automatically sends purge requests to the Bunny CDN API to clear the corresponding URLs from the CDN cache.

Features
--------

[](#features)

- Automatic CDN cache purging when content changes
- Wildcard purging for full site clears (sends `site/*` instead of enumerating every URL)
- Batched URL purging (up to 100 URLs per request)
- Configurable API endpoint and authentication method
- Environment variable support for all settings

Requirements
------------

[](#requirements)

- Craft CMS 4.0+
- Blitz 4.0+
- PHP 8.2+

Installation
------------

[](#installation)

Install via Composer:

```
composer require jorisnoo/craft-blitz-bunny-purge
```

Then go to **Settings &gt; Plugins** in the Craft control panel and install the plugin.

Configuration
-------------

[](#configuration)

1. Go to **Settings &gt; Blitz** in the control panel
2. Under **Reverse Proxy Purger**, select **Bunny CDN Purger**
3. Configure the settings:

SettingDescriptionDefault**API URL**The Bunny CDN purge API endpoint`https://api.bunny.net/purge`**API Key**Your Bunny CDN API key—**Authentication Type**`Access Key` or `Bearer Token``Access Key`All settings support environment variables (e.g., `$BUNNY_API_KEY`).

### Environment Variables

[](#environment-variables)

Add to your `.env` file:

```
BUNNY_API_KEY=your-api-key-here
```

Then reference it in the control panel as `$BUNNY_API_KEY`.

### Config File

[](#config-file)

Alternatively, you can configure the purger via `config/blitz.php` instead of the control panel:

```
