Object cache
Turn on a Redis object cache for a site to keep database results in memory. Avaloi checks that WordPress uses it, and you can turn it off again from the Add-ons tab.
Parts of this feature are still being built. The Not yet section lists them.
The object cache keeps the results of database queries in memory, so WordPress answers repeat requests faster. It suits busy sites with many logged-in users, large shops, and pages that run the same queries again and again. You turn it on for one site, and you can turn it off at any time.
The object cache costs 100 USD per month. Check the price before you enable it.
Enable or disable it
- Open the site and choose Add-ons.
- Find the Redis object cache card. It shows the monthly price, or a green check and Enabled and verified when it is on.
- Choose Enable or Disable.
You can also see it on Caching, under Redis: the tab says Enabled or Disabled, Disable turns it off, and Add to plan brings you to the Add-ons card.
The change is a job, like the other changes on a site. The card changes between the price and Enabled when the job finishes. You can follow the job in the job drawer while it runs.
Owners, admins, and billing users can change the object cache. Everyone else who can open the site can read the list and see the price, but not change it.
What happens on the site
Turning the cache on starts a Redis for the site's live environment inside its own container. Redis listens on a private socket that only your site can open, and it has a memory cap of 512 MB. Avaloi loads the object cache drop-in from a file outside your site's code, so this works on the live environment even though live code is read-only. If your site ships its own wp-content/object-cache.php, such as the Redis Object Cache plugin, Avaloi leaves it in place and points it at the same Redis. Turning the cache off empties it, stops Redis, and removes its files. Your pages and your content are not changed either way.
Every key carries the database, the environment name, and the table prefix. On a multisite network each key also carries the blog ID. Each environment has its own Redis as well, so two sites or two environments never read each other's keys.
Avaloi checks that WordPress uses it
Starting Redis is not enough, so the job does not report success until WordPress proves it. After it switches the cache on, the server runs a small check through WordPress with your real wp-config.php. It sets a key, reads it back from Redis, and confirms the key is in Redis. It also asks your site through the same PHP-FPM pool that serves visitors, so a website that still runs old settings can not pass because the command line worked.
- When the check passes, the job result says
verified: truewith the round trip time and the drop-in in use. The Add-ons card says Enabled and verified with the round trip time. - When the check fails, the job fails with the reason, such as "the PHP Redis extension is not loaded" or "WordPress is using its built-in cache because the drop-in did not load". The server switches the cache off again, and the add-on is not billed. Choose Enable again after the cause is fixed, or contact support with the job.
On Caching, under Redis, you see the verified state, the memory used and its cap, the number of keys, and the hit rate that Redis reports. Check again runs the check once more and shows the round trip time or the reason it failed. If the cache was turned on before this check existed, the tab says Not verified. Choose Turn on again to repair it.
New environments
A staging environment, a multidev, or a live environment that you create from an environment with the cache gets its own Redis with the same memory cap, and the same check runs. If the cache can not start there, the environment is still created and the job says why. Promote, restore, and backups keep the cache of the environment they run on.
Quick answers
Does turning the cache on change my pages? No. It changes how WordPress reads the database. Your content, themes, and plugins stay as they are.
Why does the card still show the price after I chose Enable? The change is a job. Wait for it to finish, or check the job drawer. If the job fails, the card stays as it was and the job shows the reason.
Will I be charged for a cache that does not work? No. A job that fails the check fails the purchase, and nothing is billed. The monthly price is shown on the tab.
Not yet
- Invoice line. Add-on prices do not appear on your invoice until add-on billing is live.
For assistants and scripts
GET /v1/sites/{id}/object-cachereturns the live state from the node. Addverify=trueto run the check again.POST /v1/sites/{id}/add-ons/{addon_id}/enableand.../disable, withobject_cacheas the add-on, run the job. The MCP tools arelist_site_add_ons(showsverified),get_object_cache,enable_add_on, anddisable_add_on.
Related
- Add-ons: the other add-ons are planned.
- Billing and plans
- Sites list
Still stuck?
Email [email protected] with your site name and what you tried, or send us a message.