Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/incapption-public/bunnypurge

BunnyCDN cache purging
https://github.com/incapption-public/bunnypurge

composer

Last synced: about 2 months ago
JSON representation

BunnyCDN cache purging

Awesome Lists containing this project

README

        

# BunnyPurge
Tiny package for purging files on BunnyCN (https://bunny.net) using Guzzle HTTP client.

## Usage

```php
$client = new BunnyPurge('YOUR_BUNNY_API_KEY');
$client->purge('https://example.b-cdn.net/example.jpg');
```

`$client->purge()` throws `BunnyException` on non 200 status codes and `GuzzleException` on request exceptions.

## Tests

Create a `phpunit.xml` in the project directory and add PHP variables for your API Key and a test URL pointing to a file on your CDN.

```xml



src/




tests





```