Repository navigation
Home
Welcome to the Ace-Redis-Cache wiki!
Install · Configure · Troubleshoot · FAQ · Website
I wrote Ace Redis Cache for the sites I run. I recommend Redis for both the page cache and the object cache. It keeps cached entries available across PHP restarts and lets multiple web servers share them.
| What the visitor gets | What it costs you | |
|---|---|---|
| Hit | The stored page, straight from Redis | Almost nothing. With early serve on, WordPress never boots. |
| Stale | The stored page, at once, while a new copy is built behind the scenes | One background render, however many visitors arrive |
| Miss | A freshly rendered page, which is then stored | One full render, helped by the object cache |
Read more: Page cache and Object cache.
| Signed-in visitors get cached pages too | Each visitor group shares its own stored copy, with the toolbar rendered fresh and every security token replaced for the person viewing |
| Stale pages are served while they refresh | An edit refreshes pages rather than wiping them, so nobody queues behind a rebuild |
| Drop-ins that step aside | If Redis cannot be reached, the page renders normally. A cache fault should never become a white screen. |
| Redis connections | Use a single Redis or Valkey server, Redis Sentinel, Redis Cluster or a managed service such as ElastiCache Serverless |
The optional cache warmer checks the next batch of pages and queues any missing copies for the background refresher.
Also in the box: live blocks, a block cache, WooCommerce guards, Varnish support, multisite, WP-CLI commands, Site Health tests and no telemetry. Optional layers stay off until you enable them.
- Install the PHP Redis extension and have a Redis or Valkey server your web server can reach.
- Install and activate the plugin.
- Open Settings > Ace Redis Cache, enter the Redis connection details and save.
- Tick Enable Cache and save to test the connection. Choose what to cache on the Caching tab.
- Add this to
wp-config.php:
define( 'WP_CACHE', true );- Load a page twice while signed out. The second response should carry
X-AceRedisCache: HIT.
The full walk-through is on Installation.
Some things people run into are how the plugin is meant to behave, not faults.
- Redis is the default. If your host has no Redis and your site runs on a single server, you can select APCu. Its cache starts empty when PHP restarts. See Hosting without Redis.
- A fresh install caches nothing. Caching is off until you tick Enable Cache.
- The page cache needs WordPress 6.9 or later. On older versions pages render live and only the object and transient caches work.
- Signed-in visitors get live pages unless you turn on the logged-in page cache.
-
A page that never says HIT has a reason, and the
X-AceRedisCacheheader gives it. See Troubleshooting.
It is:
- A page cache and an object cache that share one Redis
- Built for sites where content changes often and traffic arrives in bursts
- Careful about what it stores: private, protected, empty and half-rendered pages are refused
It is not:
- A Redis server or a hosting service
- A CDN
- An image optimiser or a script bundler
Four years in production, and more than 5.6 billion cache hits answered from Redis across the sites running it. More on Tested at scale.
Setting up
- Installation: install, connect, switch on, check it works
- Requirements and hosting: PHP, WordPress, the Redis extension and where Redis can run
-
Drop-ins: the two files in
wp-content, who writes them and when - Configuration reference: every setting and its default
The caches
- Page cache: what is cached, what never is, early serve, live blocks, stale-while-revalidate
- Object cache: groups, limits, lifetimes, who reads and who writes
- Logged-in page cache: cached pages for signed-in visitors
- Block cache: stored HTML for expensive blocks
- Purging and refresh: what an edit does, soft purges, the refresher
Your stack
Reference
- WP-CLI
- Constants and filters
- Hook examples: fifteen worked examples you can paste into a plugin
- Response headers
- Tested at scale
- Changelog
Help
Ace Redis Cache: a page cache and object cache for WordPress, backed by Redis or Valkey. Written and maintained by Shane Rounce at AceMedia. Website · Repository · Issues · GPLv2 or later
Setting up
The caches
Your stack
Reference
Help


