Repository navigation
Multisite
Ace Redis Cache works on a WordPress network, and can be run in two ways.
Network activate the plugin and it is in network mode:
- One set of settings for the whole network, stored at network level.
- The settings screen is at Network Admin > Settings > Ace Redis Cache.
- Changing settings needs the
manage_network_optionscapability.
This is the mode I recommend. Every site on a network shares one wp-content folder, and so shares one pair of drop-ins and one Redis connection. One set of settings matches that.
If the plugin was set up on the main site before you network activated it, the main site's settings are copied to the network the first time it loads.
Activate the plugin on individual sites and each keeps its own settings, under Settings > Ace Redis Cache on that site.
The drop-ins are still shared by the whole network, because WordPress loads them from the one wp-content folder. Bear that in mind: turning the page cache off on one site removes advanced-cache.php for all of them. Use network mode unless you have a reason not to.
| Cache | How a site's entries are separated |
|---|---|
| Page cache | Every key includes the host name, so each site's pages are its own. Subdirectory networks are separated by path as well. |
| Purge and refresh queues | Scoped by host and path. One site's refresher never works through another's queue. |
| Object cache | Keys carry the blog id. WordPress's global groups (users, site transients and the like) are shared across the network, as WordPress intends. |
A purge or soft purge on one site leaves the others alone.
Pages are stored under the host name the site is set up with. A request that arrives on a different host name is rendered live and not stored, so a page never ends up cached under an address that is not the site's own.
Constants in wp-config.php apply to the whole network: the connection, ACEREDIS_DB, ACEREDIS_EARLY_SERVE and the rest.
Request a page from two different sites, twice each:
curl -sI https://one.example.com/ | grep -i x-acecurl -sI https://two.example.com/ | grep -i x-aceEach should go from MISS to HIT on its own, and each should show its own content.
Select the participating site IDs on the Caching tab. Each eligible site uses its own worker scope and cache. The root site of a path-based network is excluded so its worker cannot cover every child site. Offline home page settings
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
