PHPackages                             jdare/acetone - 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. jdare/acetone

ActiveLibrary[Caching](/categories/caching)

jdare/acetone
=============

Laravel4 package for purging &amp; banning cached items in Varnish

1.0.0(12y ago)2575[1 issues](https://github.com/JDare/Acetone/issues)PHPPHP &gt;=5.3.0

Since Mar 24Pushed 12y agoCompare

[ Source](https://github.com/JDare/Acetone)[ Packagist](https://packagist.org/packages/jdare/acetone)[ RSS](/packages/jdare-acetone/feed)WikiDiscussions master Synced 3d ago

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

Acetone
=======

[](#acetone)

Laravel4 package for purging, refreshing &amp; banning cached items in Varnish

Using web accelerators such as varnish to speed up your web application has become common place. This small package is designed to alleviate the problem of cache expiration with dynamic data generated sites.

Installation
============

[](#installation)

Begin by adding the following to your `composer.json`

```
"require": {
    "jdare/acetone": "dev-master"
}

```

Run a composer update `composer update`

Add it to your list of providers in laravel `/app/app.php`

```
'providers' => array(
    ...
    'JDare\Acetone\AcetoneServiceProvider',
),

```

Publish the configuration file using `php artisan config:publish jdare/acetone`

Configuration
=============

[](#configuration)

Open the newly generated config file `app/config/packages/jdare/acetone/config.php`

The configurable options are:

- Server Address
- Force Exceptions
- Ban URL Header

The documentation for each option is available inside the file.

Usage
=====

[](#usage)

*Please Note*: All these functions assume some sort of standard VCL setup for purging/refreshing/banning. Please check [the docs folder](/docs/sample.default.vcl) for a reference on how your varnish should interpret these requests.

For the differences between Purge, Refresh and Ban, please check the [Varnish documentation](https://www.varnish-cache.org/docs/3.0/tutorial/purging.html).

\##Purge &amp; Refresh When you need to invalidate your cache, you can provide a URL to be removed as a parameter for Acetones functions. Here are some sample usages:

```
function someAction()
{
    //update some information in a template or database

    Acetone::purge("/post/my-updated-post"); //Removed old version from Varnish

    //Alternatively use Acetone::refresh("/post/my-updated-post") if it suits your caching needs better.
}

```

Both Purge and Refresh will accept arrays of URL's, however be warned each url will need an individual request to varnish. This can end up having a large overhead and can massively increase your response time.

To better invalidate mass URL's use Ban or BanMany

\##Ban &amp; BanMany

Ban will work the same way as Purge and Refresh if needed, however it can also accept an optional parameter to make it match a Regex string rather than a URL.

```
function someAction()
{
    //update some information in a template or database

    Acetone::ban("^/post", true); //will remove any URL's matching "/post(.*)"
}

```

A helper function is available for mass banning, called "banMany", e.g.

```
Acetone::banMany("/post"); //will ban any URL starting with /post

```

ban &amp; banMany are much more efficient ways to remove lots of URL's due to Varnish' pattern matching, rather than having to make a single request for every URL.

FAQ
===

[](#faq)

Purge returns a 404 exception.

`Client error response [status code] 404 [reason phrase] Not in cache [url] *URL*`

If your VCL is setup to throw a 404 when a purge item is not in the cache, Guzzle will throw an exception. These will only occur locally and be supressed automatically when used in a production environment. However you can disable them permanently, by setting `force_exceptions` to `false` in the config.php

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% 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

Unknown

Total

1

Last Release

4435d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a85df19974d8461f8040c9f0d821de363af8ada6f26ef10264cab89cb3c4f12?d=identicon)[jdare](/maintainers/jdare)

---

Top Contributors

[![JDare](https://avatars.githubusercontent.com/u/3409569?v=4)](https://github.com/JDare "JDare (13 commits)")[![thomaswelton](https://avatars.githubusercontent.com/u/678372?v=4)](https://github.com/thomaswelton "thomaswelton (1 commits)")

---

Tags

laravelvarnishpurgeban

### Embed Badge

![Health badge](/badges/jdare-acetone/health.svg)

```
[![Health](https://phpackages.com/badges/jdare-acetone/health.svg)](https://phpackages.com/packages/jdare-acetone)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[awssat/laravel-visits

Laravel Redis visits counter for Eloquent models

975163.6k2](/packages/awssat-laravel-visits)[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)[encore/redis-manager

Redis manager for laravel

25243.1k](/packages/encore-redis-manager)[dragon-code/laravel-cache

An improved interface for working with cache

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

A handful of Cloudflare cache helpers for Laravel

1317.7k](/packages/nexxai-laravel-cfcache)

PHPackages © 2026

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