PHPackages                             jorisnoo/statamic-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/statamic-bunny-purge

ActiveLibrary[Caching](/categories/caching)

jorisnoo/statamic-bunny-purge
=============================

Automatically purge Bunny CDN cache when Statamic content changes.

0.5.0(2mo ago)0182[2 PRs](https://github.com/jorisnoo/statamic-bunny-purge/pulls)MITPHPPHP ^8.3CI passing

Since Jan 28Pushed 1mo agoCompare

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

READMEChangelog (9)Dependencies (14)Versions (13)Used By (0)

Statamic Bunny Purge
====================

[](#statamic-bunny-purge)

[![Latest Version on Packagist](https://camo.githubusercontent.com/75ec87b8d39bb44c2b7dd38e293c8a870a0b2546ed79951fa4aee5954b676aa6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f7269736e6f6f2f73746174616d69632d62756e6e792d70757267652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jorisnoo/statamic-bunny-purge)[![GitHub Tests Action Status](https://camo.githubusercontent.com/19dab0f7338ce2ef4ed51b5e08cfed822e880fd76ced9b23445ba3a2cddde1c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6f7269736e6f6f2f73746174616d69632d62756e6e792d70757267652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jorisnoo/statamic-bunny-purge/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a6b1efdd970d0e2aa9e240cc210a8a2f318fbcde03ea09f4f2329d6cbedce2c1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6f7269736e6f6f2f73746174616d69632d62756e6e792d70757267652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jorisnoo/statamic-bunny-purge/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b32c29ed82f87a5cd6828ccc20e86a28e8929d9b80f41a49926c5efb516c31a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f7269736e6f6f2f73746174616d69632d62756e6e792d70757267652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jorisnoo/statamic-bunny-purge)

Automatically purge your CDN cache when Statamic content changes. Works with Bunny CDN out of the box, but supports any CDN with a purge API.

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

[](#installation)

You can install the package via composer:

```
composer require jorisnoo/statamic-bunny-purge
```

Add your API key to `.env`:

```
CDN_PURGE_API_KEY=your-bunny-api-key
```

That's it — Bunny CDN is the default and works without any further configuration.

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

[](#configuration)

You can publish the config file with:

```
php artisan vendor:publish --tag="statamic-bunny-purge"
```

This is the contents of the published config file:

```
return [
    'api_url' => env('CDN_PURGE_API_URL', 'https://api.bunny.net/purge'),
    'api_key' => env('CDN_PURGE_API_KEY'),
    'auth_type' => env('CDN_PURGE_AUTH_TYPE', 'access_key'),
];
```

KeyDescriptionDefault`api_url`The CDN purge API endpoint`https://api.bunny.net/purge``api_key`Your CDN API key—`auth_type`Auth header style: `access_key` or `bearer``access_key`### Using a custom CDN

[](#using-a-custom-cdn)

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

```
CDN_PURGE_API_URL=https://cdn.example.com/api/cache/purge
CDN_PURGE_API_KEY=your-api-key
CDN_PURGE_AUTH_TYPE=bearer
```

Usage
-----

[](#usage)

The package works automatically. It listens to Statamic's URL invalidation events and purges the corresponding URLs from your CDN cache whenever content changes.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Joris Noordermeer](https://github.com/jorisnoo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance86

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

10

Last Release

89d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0440b6ac994d5566a2ef5886fbac104a73f8458e70dbd20085e241ab0f647e0d?d=identicon)[jorgenoo](/maintainers/jorgenoo)

---

Top Contributors

[![jorisnoo](https://avatars.githubusercontent.com/u/5810772?v=4)](https://github.com/jorisnoo "jorisnoo (38 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelJoris Noordermeerstatamic-bunny-purge

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jorisnoo-statamic-bunny-purge/health.svg)

```
[![Health](https://phpackages.com/badges/jorisnoo-statamic-bunny-purge/health.svg)](https://phpackages.com/packages/jorisnoo-statamic-bunny-purge)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[ryangjchandler/blade-cache-directive

Cache chunks of your Blade markup with ease.

202200.8k2](/packages/ryangjchandler-blade-cache-directive)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[innoge/laravel-policy-soft-cache

This package helps prevent performance problems with frequent Policy calls within your application lifecycle.

2356.9k](/packages/innoge-laravel-policy-soft-cache)[namoshek/laravel-redis-sentinel

An extension of Laravels Redis driver which supports connecting to a Redis master through Redis Sentinel.

38679.0k](/packages/namoshek-laravel-redis-sentinel)[dragon-code/laravel-cache

An improved interface for working with cache

6844.8k10](/packages/dragon-code-laravel-cache)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
