Repository navigation
Configuration reference
Every setting on Settings > Ace Redis Cache, tab by tab, with its default.
Settings are stored in one option, aceredis_cache_settings: a site option when the plugin is network activated, an ordinary option otherwise. The name in the third column is the key inside that option.
Saving the settings clears the cache. The one exception: a save that only changes block cache settings retires block entries and leaves pages and objects alone. On a busy site, change settings at a quiet time.
| Setting | Default | Key | Notes |
|---|---|---|---|
| Enable Cache | off | enabled |
The master switch. Nothing is cached while it is off. |
| Redis Host | 127.0.0.1 |
host |
Host name or IP address |
| Redis Port | 6379 |
port |
|
| Password | empty | password |
The AUTH password |
| TLS Encryption | off | enable_tls |
For servers that require TLS in transit |
Saving with the cache enabled, or with a new host, port, password or TLS setting, tests the connection first. If the test fails, the previous settings stay and the message says what failed.
The Redis database number is set with the ACEREDIS_DB constant, so that the drop-ins and the plugin always agree. See Constants and filters.
| Setting | Default | Key | Notes |
|---|---|---|---|
| Page Cache | on | enable_page_cache |
Installs advanced-cache.php. Needs WordPress 6.9. |
| Page Cache TTL | 3600 | ttl_page |
Seconds a stored page is fresh |
| Page Cache Max TTL | 0 (off) | page_cache_max_ttl |
Cap on fresh lifetime plus grace in Redis |
| Object Cache | off | enable_object_cache |
|
| Object Cache TTL | 3600 | ttl_object |
Seconds, minimum 60 |
| Object Cache Max TTL | 86400 | object_cache_max_ttl |
Cap on every object cache key. 0 for no cap, otherwise 60 to 2592000. |
| Transient Cache | off | enable_transient_cache |
Installs object-cache.php so transients are kept in Redis |
| Setting | Default | Key | Notes |
|---|---|---|---|
| Stale-while-revalidate grace | 3600 | page_cache_grace |
Seconds past the TTL a stale page may be served while it is refreshed. 0 to 86400. 0 turns stale serving off. |
| Fresh TTL jitter | 0 | page_cache_ttl_jitter |
Percent, 0 to 50. Cuts each page's fresh lifetime by a random amount. |
| Best-selling products to warm | 20 | wc_warm_count |
WooCommerce only. 0 to 100. |
| Setting | Default | Key | Notes |
|---|---|---|---|
| Minification | off | enable_minification |
Minifies HTML before it is stored |
| Compression | off | enable_compression |
Stores pages compressed |
| Compression method | Brotli | compression_method |
brotli or gzip. A method PHP lacks is greyed out. |
Compression levels (brotli_level_page 9, brotli_level_object 5, gzip_level_page 6, gzip_level_object 6) and the smallest size worth compressing (min_compress_size, 512 bytes) have no fields. Change them with the filters of the same name prefixed aceredis_.
| Setting | Default | Key | Notes |
|---|---|---|---|
| Browser Cache Headers | off | enable_browser_cache_headers |
Sends public Cache-Control on page cache hits |
| Max-Age | 3600 | browser_cache_max_age |
Seconds |
| Cache meta headers | off | send_cache_meta_headers |
Age, expiry, compression and live block counters. For debugging. |
| Setting | Default | Key | Notes |
|---|---|---|---|
| Serve cached pages to logged-in users | off | page_cache_logged_in |
See Logged-in page cache |
| Administrators | on | page_cache_li_admins |
Applies once the setting above is on |
| Editors | on | page_cache_li_editors |
|
| Readers | on | page_cache_li_readers |
|
| Signed-in front-end pages read the object cache | on | member_object_cache_read |
Read only, never write |
| wp-admin screens read the object cache | off | admin_object_cache_read |
Read only, never write |
| wp-admin query cache | off | admin_query_cache |
See Object cache |
| Keep for up to | 300 | admin_query_cache_ttl |
Seconds |
| Setting | Default | Key | Notes |
|---|---|---|---|
| Static Asset Cache | off | enable_static_asset_cache |
Long-lived Cache-Control for same-origin assets, with cache-busting query strings |
| Static TTL | 604800 | static_asset_cache_ttl |
Seconds |
| Manage via .htaccess | off | manage_static_cache_via_htaccess |
Apache only. Writes a small managed block and leaves your other rules alone. |
| Prefer existing headers | on | prefer_existing_static_cache_headers |
Removes the managed block when long-lived headers are already being sent |
| Setting | Default | Key | Notes |
|---|---|---|---|
| Block Cache | off | block_cache_enabled |
See Block cache |
| WooCommerce blocks | on | block_cache_woo |
Applies once Block Cache is on |
| Query Loop | on | block_cache_query |
|
| Latest Posts | on | block_cache_latest_posts |
|
| Custom blocks | on | block_cache_custom |
|
| Cache for logged-in users | off | block_cache_logged_in |
Per role |
| Block cache TTL | 43200 | block_cache_ttl |
Seconds |
| Setting | Default | Key | Notes |
|---|---|---|---|
| Dynamic Microcache | off | enable_dynamic_microcache |
Short cache for live block HTML |
| Microcache TTL | 10 | dynamic_microcache_ttl |
1 to 60 seconds |
| Setting | Default | Key | Notes |
|---|---|---|---|
| OPcache Helpers | off | enable_opcache_helpers |
Refreshes this site's own PHP files in OPcache after a deploy or settings change. Shared code is left alone. |
One pattern per line. * and ? are wildcards.
| Setting | Key | What it does |
|---|---|---|
| Exclude Sitemaps | exclude_sitemaps |
Keeps sitemap URLs out of the page cache. Off by default. |
| Cache Key Exclusions | custom_cache_exclusions |
Object cache keys that are never stored, for example user_meta_*
|
| Transient Exclusions | custom_transient_exclusions |
Transients that are never stored in Redis, for example _transient_feed_*
|
| Content Exclusions | custom_content_exclusions |
Text that, when found in a page, stops that page being minified |
| Block Exclusions | excluded_blocks |
Block names, for example core/html or my-plugin/live-*
|
| Exclude common basic blocks | exclude_basic_blocks |
Adds paragraph, heading, list, image and gallery to the list |
| Treat excluded blocks as dynamic | dynamic_excluded_blocks |
Cuts the listed blocks out of the stored page and renders them on each hit. See Page cache. |
To exclude URLs from the page cache, use the aceredis_cache_excluded_urls filter:
add_filter( 'aceredis_cache_excluded_urls', function ( $patterns ) {
$patterns[] = '/members/';
return $patterns;
} );A URL is excluded when it contains any of the strings.
Shown only when WooCommerce is active. Every setting is described on WooCommerce.
| Setting | Default | Key |
|---|---|---|
| Cached pages for logged-in customers | off | wc_page_cache_customers |
| Basket and checkout object cache reads | off | wc_object_cache_read |
| Cart Cookie on Product Pages | on | wc_skip_cart_cookies |
| Persistent Cart (disable) | on | wc_disable_persistent_cart |
| Variation AJAX Threshold | 15 | wc_variation_threshold |
| Action Scheduler time limit | 15 | wc_action_scheduler_time_limit |
| Action Scheduler batch size | 10 | wc_action_scheduler_batch_size |
| Skip Variation Children on Archives | on | wc_skip_children_on_archives |
| Skip Composite Sync on Archives | on | wc_skip_composite_sync_on_archives |
| WooCommerce URL Exclusions | on | wc_cache_url_exclusions |
Nothing to set here. The tab has:
- Connection Test: connects, writes a value and reads it back.
-
System Diagnostics: PHP, the Redis extension, the server's version and memory, the state of each drop-in and of
WP_CACHE, and suggestions. - Performance Metrics: hit and miss counts and key counts.
In the sidebar of the settings screen, and in the admin toolbar: Clear All Cache. See Purging and refresh.
The settings screen uses a REST API under /wp-json/ace-redis-cache/v1/, open to administrators only. The routes most useful to scripts:
| Route | Method | Does |
|---|---|---|
/status |
GET | Connection and cache state |
/health |
GET | Cache health figures |
/flush-cache |
POST | Clears the cache |
/block-cache/stats |
GET | Block cache figures |
/block-cache/flush |
POST | Retires stored blocks |
/dropins-status |
GET | State of the two drop-ins |
/dropins-update |
POST | Installs the plugin's current drop-ins |
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
