PHPackages                             leocolomb/wp-acorn-cache - 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. leocolomb/wp-acorn-cache

ActiveLibrary[Caching](/categories/caching)

leocolomb/wp-acorn-cache
========================

A cache manager powered by Laravel through Acorn.

2.2.0(3y ago)13511ISCPHPPHP ^8.0CI passing

Since Dec 7Pushed 1mo ago5 watchersCompare

[ Source](https://github.com/LeoColomb/wp-acorn-cache)[ Packagist](https://packagist.org/packages/leocolomb/wp-acorn-cache)[ Docs](https://github.com/LeoColomb/wp-acorn-cache)[ GitHub Sponsors](https://github.com/LeoColomb)[ Patreon](https://www.patreon.com/LeoColomb)[ RSS](/packages/leocolomb-wp-acorn-cache/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (6)Versions (8)Used By (0)

Acorn Cache for WordPress
=========================

[](#acorn-cache-for-wordpress)

> A cache manager powered by [Laravel](https://laravel.com/) through [Acorn](https://roots.io/acorn/).

[![Build Status](https://github.com/LeoColomb/wp-acorn-cache/workflows/PHP%20CI/badge.svg)](https://github.com/LeoColomb/wp-acorn-cache/actions?query=workflow%3APHP%20CI)[![Packagist](https://camo.githubusercontent.com/4477407818de7a04ddaeb911f806bcb23875c5cf0753f9beaaa6dc1a0bbdc524/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4c656f436f6c6f6d622f77702d61636f726e2d63616368652e737667)](https://packagist.org/packages/LeoColomb/wp-acorn-cache)

Warning

🚧 This project is still rather experimental.
Most probably not functional out of the box and definitely not ready for production.

About
-----

[](#about)

This plugin provides cache handlers for WordPress, using [Acorn](https://roots.io/acorn/) framework based on [Laravel](https://laravel.com/) fondation.

- Enables the two cache wrappers for WordPress using [drop-ins](https://developer.wordpress.org/reference/functions/_get_dropins/).
    - Object Cache ([`object-cache.php`](dropins/object-cache.php))
    - Advanced Page Cache (optional) ([`advanced-cache.php`](dropins/advanced-cache.php))
- Compatible with any driver supported by Laravel (including Redis, Memcached and Array).
- Adds handy [WP-CLI](https://wp-cli.org/) commands.
- Targets modern software stacks.

Usage
-----

[](#usage)

- Prepare your Composer file by adding custom paths.
    Replace `` with your WordPress content path, `web/app/` with [Bedrock](https://roots.io/bedrock/).
    See [more info](https://github.com/Koodimonni/Composer-Dropin-Installer#readme).

    ```
    {
      "extra": {
        "dropin-paths": {
          "": [
            "package:leocolomb/wp-acorn-cache:dropins/object-cache.php",
            "package:leocolomb/wp-acorn-cache:dropins/advanced-cache.php"
          ]
        }
      }
    }
    ```
- Require the installer and allow its usage.

    ```
    composer require koodimonni/composer-dropin-installer
    ```
- Require the package in your Composer-managed WordPress instance.

    ```
    composer require leocolomb/wp-acorn-cache
    ```

### Object Cache

[](#object-cache)

The WordPress Object Cache is used to save on trips to the database. The Object Cache stores all of the cache data to memory and makes the cache contents available by using a key, which is used to name and later retrieve the cache contents.

See [WordPress documentation](https://developer.wordpress.org/reference/classes/wp_object_cache/).

#### Driver (recommended)

[](#driver-recommended)

The cache driver must be setup as per [Laravel documentation](https://laravel.com/docs/cache#configuration).

When using [Bedrock](https://roots.io/bedrock/) as WordPress boilerplate, specify the driver in your `.env` file.

```
CACHE_DRIVER=redis
```

#### Configuration (optional)

[](#configuration-optional)

Object cache behavior can be configured with its appropriate config file, [`config/object-cache.php`](config/object-cache.php).

Start by publishing the configuration file using Acorn.

```
wp acorn vendor:publish --provider="LeoColomb\WPAcornCache\Providers\AcornCacheServiceProvider"
```

### Page Cache

[](#page-cache)

With Page Caching, you cache the full output of a page (i.e. the response) and bypass WordPress entirely on subsequent requests.

**Note:** The page cache is using [Symfony HttpCache](https://symfony.com/doc/current/http_cache.html). While quite efficient, you should prefer using an appropriate page cache tool, like Varnish, Nginx cache or a CDN.

#### Activation (optional)

[](#activation-optional)

Page cache is not activated per default with WordPress. To enable page cache, define the constant `WP_CACHE` to `true`.

#### Configuration (optional)

[](#configuration-optional-1)

Page cache behavior can be configured with its appropriate config file, [`config/page-cache.php`](config/page-cache.php).

Start by publishing the configuration file using Acorn.

```
wp acorn vendor:publish --provider="LeoColomb\WPAcornCache\Providers\AcornCacheServiceProvider"
```

License
-------

[](#license)

ISC © [Léo Colombaro](https://colombaro.fr)

###  Health Score

41

—

FairBetter than 88% of packages

Maintenance60

Regular maintenance activity

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 82.8% 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 ~130 days

Total

5

Last Release

1457d ago

Major Versions

1.0.0 → 2.0.02021-11-01

PHP version history (2 changes)1.0.0PHP &gt;=7.4

2.2.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ea3e6a548d6c74e6e24410d5208dc9ea72bcc294f4d7ca118df913b278e1bb0?d=identicon)[LeoColomb](/maintainers/LeoColomb)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (149 commits)")[![LeoColomb](https://avatars.githubusercontent.com/u/846943?v=4)](https://github.com/LeoColomb "LeoColomb (31 commits)")

---

Tags

acorncachecachinglaravelsagewordpresswordpress-cachewordpress-drop-inwordpress-object-cachelaravelwordpressacornwordpress-dropinwordpress-cachecache-objectcache-pagecache-advanced

###  Code Quality

TestsPest

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/leocolomb-wp-acorn-cache/health.svg)

```
[![Health](https://phpackages.com/badges/leocolomb-wp-acorn-cache/health.svg)](https://phpackages.com/packages/leocolomb-wp-acorn-cache)
```

###  Alternatives

[leocolomb/wp-redis

A persistent cache backend for WordPress powered by Redis.

197.2k](/packages/leocolomb-wp-redis)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[stevegrunwell/wp-cache-remember

Helper for the WordPress object cache and transients

14891.2k](/packages/stevegrunwell-wp-cache-remember)[rtcamp/nginx-helper

Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also provides cloudflare edge cache purging with Cache-Tags.

23817.0k1](/packages/rtcamp-nginx-helper)[rarst/fragment-cache

WordPress plugin for partial and async caching of heavy front-end elements.

14115.0k2](/packages/rarst-fragment-cache)

PHPackages © 2026

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