[Skip to content](#main)

[→](/)

[![Avunu](/brand/avunu-logo.svg)![Avunu](/brand/avunu-logo-light.svg)](/)[Services](/services/)[Consulting](/services/consulting/)[ERP](/services/erp/)[Odoo](/services/erp/odoo/)[ERPNext](/services/erp/erpnext/)[Custom software](/services/custom-software/)[Devices & IoT](/services/devices-iot/)[Websites](/services/websites/)[Infrastructure](/services/infrastructure/)[Partners](/partners/)

[Work](/work/)[Open source](/open-source/)[Knowledge base](/kb/)[About](/about/)

[About Avunu](/about/)[Team](/about/team/)[Insights](/insights/)[Contact](/contact/)

[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

- [Services](/services/)[Consulting](/services/consulting/)
- [ERP](/services/erp/)
- [Odoo](/services/erp/odoo/)
- [ERPNext](/services/erp/erpnext/)
- [Custom software](/services/custom-software/)
- [Devices & IoT](/services/devices-iot/)
- [Websites](/services/websites/)
- [Infrastructure](/services/infrastructure/)
- [Partners](/partners/)

[Work](/work/)[Open source](/open-source/)[Knowledge base](/kb/)[About](/about/)

- [About Avunu](/about/)
- [Team](/about/team/)
- [Insights](/insights/)
- [Contact](/contact/)

[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

[Knowledge base](/kb/)[WordPress](/kb/wordpress/)Docket Cache baseline configuration

Search the knowledge basePress/

ESC

Jump to

[Browse the knowledge base](/kb/)[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[WordPress](/kb/wordpress/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

↵select↑↓navigateescclose

Search the knowledge base

[Skip to the article](#kb-article)[WordPress](/kb/wordpress/)10 articles

- [Overview](/kb/wordpress/)
- [Admin-only custom post types with custom list columns](/kb/wordpress/custom-post-type-admin/)
- [Docket Cache baseline configuration](/kb/wordpress/docket-cache-configuration/)
- [Gravity Forms](/kb/wordpress/gravity-forms/)
- [Populate Gravity Forms image choices from an ACF image field](/kb/wordpress/gravity-forms-image-choices-acf/)
- [Register custom block styles in a classic theme](/kb/wordpress/block-styles-classic-themes/)
- [Run WordPress cron from the system scheduler](/kb/wordpress/wordpress-cron/)
- [Split a child theme's functions.php into included files](/kb/wordpress/child-theme-file-includes/)
- [WordPress database optimization queries](/kb/wordpress/database-optimization-queries/)
- [WordPress debugging snippets](/kb/wordpress/debugging-snippets/)
- [WP-CLI cookbook](/kb/wordpress/wp-cli-cookbook/)
- [wp-config.php reference](/kb/wordpress/wp-config-reference/)

Other sections[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

In WordPress: 10 articles

[Overview](/kb/wordpress/)[Admin-only custom post types with custom list columns](/kb/wordpress/custom-post-type-admin/)[Docket Cache baseline configuration](/kb/wordpress/docket-cache-configuration/)[Gravity Forms](/kb/wordpress/gravity-forms/)[Populate Gravity Forms image choices from an ACF image field](/kb/wordpress/gravity-forms-image-choices-acf/)[Register custom block styles in a classic theme](/kb/wordpress/block-styles-classic-themes/)[Run WordPress cron from the system scheduler](/kb/wordpress/wordpress-cron/)[Split a child theme's functions.php into included files](/kb/wordpress/child-theme-file-includes/)[WordPress database optimization queries](/kb/wordpress/database-optimization-queries/)[WordPress debugging snippets](/kb/wordpress/debugging-snippets/)[WP-CLI cookbook](/kb/wordpress/wp-cli-cookbook/)[wp-config.php reference](/kb/wordpress/wp-config-reference/)

Other sections[Frappe](/kb/frappe/)[ERPNext](/kb/erpnext/)[Odoo](/kb/odoo/)[NixOS](/kb/nixos/)[Email](/kb/email/)[Linux](/kb/linux/)[Databases](/kb/databases/)[Containers](/kb/containers/)[Proxmox](/kb/proxmox/)[Git & Dev Tools](/kb/git-and-dev-tools/)

WordPressDocket Cache baseline configuration

Avunu's wp-config.php baseline for the Docket Cache file-based object cache, with what each constant changes and which ones to leave out.

UpdatedOct 1, 2026

Applies toWordPress 6.xDocket Cache 26.x

Tagswordpresscachingperformancewp-config

Reading time5 min

On this page[Baseline](#baseline)[What the Settings Do](#what-the-settings-do)[Storage Limits](#storage-limits)[Caching Features](#caching-features)[Trimmed Features](#trimmed-features)[Admin and Maintenance](#admin-and-maintenance)[Settings Left Out](#settings-left-out)[Useful Commands](#useful-commands)

[Docket Cache](https://wordpress.org/plugins/docket-cache/) is a persistent object cache that stores cached objects as PHP files, so OPcache serves them from memory. Use it on hosts that don't offer Redis or Memcached. This page lists the constants Avunu sets in `wp-config.php` and why.

Constants in `wp-config.php` override the plugin's Configuration screen and lock those options in the admin, so the settings survive a database reset or a migration.

Note

Only one persistent object cache can be active, because they all use the same `wp-content/object-cache.php` drop-in. Don't run Docket Cache alongside Redis Object Cache or a host's built-in object cache. See [wp-config Reference](/kb/wordpress/wp-config-reference/) for the Redis alternative.

## Baseline

Add this to `wp-config.php` above the `/* That's all, stop editing! */` line:

```
<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Docket Cache: storage limits.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_MAXFILE'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">200000</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );          </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Default 50000.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_MAXSIZE_DISK'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">2147483648</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> ); </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// 2 GB. Default 500 MB.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_CHUNKCACHEDIR'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );      </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Spread files across subfolders.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_FLUSH_STALECACHE'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>

<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Docket Cache: caching features.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_PRECACHE'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_MENUCACHE'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_MOCACHE'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_OPTERMCOUNT'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_OPTWPQUERY'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_MISC_TWEAKS'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_WOOTWEAKS'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_POSTMISSEDSCHEDULE'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_WPOPTALOAD'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>

<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Docket Cache: trim WordPress features the site doesn't use.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_HEADERJUNK'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_WPEMOJI'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_WPDASHBOARDNEWS'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_WPBROWSEHAPPY'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_WPSERVEHAPPY'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_WPLAZYLOAD'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );        </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Keep native lazy loading.</span>

<span style="--shiki-dark:#8B949E;--shiki-light:#6E7781">// Docket Cache: admin and maintenance.</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_PAGELOADER'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_PRELOAD'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_GCACTION'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_FLUSHACTION'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_OPCSHUTDOWN'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">true</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_CRONOPTMZDB'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'weekly'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_CRONBOT'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_STATS'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_LOG'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_LOG_ALL'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_SIGNATURE'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_CHECKVERSION'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
<span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">define</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">( </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">'DOCKET_CACHE_AUTOUPDATE'</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">, </span><span style="--shiki-dark:#79C0FF;--shiki-light:#0550AE">false</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> );</span>
```

## What the Settings Do

### Storage Limits

| Constant                        | Value        | Why                                                                                                                                       |
| ------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `DOCKET_CACHE_MAXFILE`          | `200000`     | Maximum number of cache files. The default of 50,000 fills up quickly on WooCommerce sites, and the cache churns when it hits the limit.  |
| `DOCKET_CACHE_MAXSIZE_DISK`     | `2147483648` | Total cache size on disk (2 GB). Check the account's disk and inode quota before raising it.                                              |
| `DOCKET_CACHE_CHUNKCACHEDIR`    | `true`       | Splits files into subfolders so one directory doesn't hold hundreds of thousands of files. Makes manual clearing and backups much faster. |
| `DOCKET_CACHE_FLUSH_STALECACHE` | `true`       | Removes stale WooCommerce and WordPress query caches instead of waiting for them to expire.                                               |

### Caching Features

| Constant                                  | Value   | Why                                                                                                                                                                 |
| ----------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DOCKET_CACHE_PRECACHE`                   | `true`  | Loads the objects a URL needed last time in one go, before WordPress asks for them.                                                                                 |
| `DOCKET_CACHE_MENUCACHE`                  | `true`  | Caches rendered navigation menus. Off by default.                                                                                                                   |
| `DOCKET_CACHE_MOCACHE`                    | `true`  | Caches translation files. Worth it on any site not in English, and harmless otherwise.                                                                              |
| `DOCKET_CACHE_OPTERMCOUNT` / `OPTWPQUERY` | `true`  | Optimize term-count and core query patterns.                                                                                                                        |
| `DOCKET_CACHE_MISC_TWEAKS` / `WOOTWEAKS`  | `true`  | General WordPress and WooCommerce performance tweaks (both default to on).                                                                                          |
| `DOCKET_CACHE_POSTMISSEDSCHEDULE`         | `true`  | Publishes scheduled posts that WP-Cron missed.                                                                                                                      |
| `DOCKET_CACHE_WPOPTALOAD`                 | `false` | Leaves option autoloading alone. Fix large autoloaded options directly instead (see [Database Optimization Queries](/kb/wordpress/database-optimization-queries/)). |

### Trimmed Features

Each of these turns a WordPress feature *off* when set to `true`.

| Constant                                      | Effect                                                                           |
| --------------------------------------------- | -------------------------------------------------------------------------------- |
| `DOCKET_CACHE_HEADERJUNK`                     | Removes generator tags, RSD/WLW links, and similar clutter from `<head>`.        |
| `DOCKET_CACHE_WPEMOJI`                        | Removes the emoji detection script and styles.                                   |
| `DOCKET_CACHE_WPDASHBOARDNEWS`                | Removes the Events and News dashboard widget and its remote requests.            |
| `DOCKET_CACHE_WPBROWSEHAPPY` / `WPSERVEHAPPY` | Stops the browser and PHP version checks that call WordPress.org from the admin. |
| `DOCKET_CACHE_WPLAZYLOAD`                     | Set to `false` so native image lazy loading stays on.                            |

These remove features that some sites rely on. Enable them per site only when you're sure:

| Constant                        | Turns off                                               | Leave it off when                                                                                                                      |
| ------------------------------- | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `DOCKET_CACHE_WPFEED`           | RSS/Atom feeds                                          | The site has a blog, podcast, or feed-driven integration.                                                                              |
| `DOCKET_CACHE_WPSITEMAP`        | Core `wp-sitemap.xml`                                   | No SEO plugin provides its own sitemap.                                                                                                |
| `DOCKET_CACHE_PINGBACK`         | XML-RPC and pingbacks                                   | Jetpack, the mobile app, or another service uses XML-RPC.                                                                              |
| `DOCKET_CACHE_WPAPPPASSWORD`    | Application Passwords                                   | Any integration authenticates to the REST API with an application password.                                                            |
| `DOCKET_CACHE_LIMITHTTPREQUEST` | Most outgoing HTTP requests from plugins on admin pages | Premium plugins need license checks or update requests. Use `DOCKET_CACHE_LIMITHTTPREQUEST_WHITELIST` for hosts that must get through. |

### Admin and Maintenance

| Constant                                 | Value      | Why                                                                                                                                                |
| ---------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DOCKET_CACHE_PAGELOADER`                | `false`    | Turns off the admin page-loading overlay.                                                                                                          |
| `DOCKET_CACHE_PRELOAD`                   | `true`     | Warms common admin pages after a cache flush.                                                                                                      |
| `DOCKET_CACHE_GCACTION` / `FLUSHACTION`  | `true`     | Adds Garbage Collector and extra Flush buttons to the plugin screens.                                                                              |
| `DOCKET_CACHE_OPCSHUTDOWN`               | `true`     | Also flushes OPcache when the plugin is deactivated.                                                                                               |
| `DOCKET_CACHE_CRONOPTMZDB`               | `'weekly'` | Runs `OPTIMIZE TABLE` on the WordPress tables weekly. Use `'never'` on very large databases and optimize during a maintenance window.              |
| `DOCKET_CACHE_CRONBOT`                   | `false`    | Cronbot is an external service that pings the site hourly. Use a real server cron instead (see [WordPress Cron](/kb/wordpress/wordpress-cron/)).   |
| `DOCKET_CACHE_STATS` / `LOG` / `LOG_ALL` | `false`    | Avoids the overhead of stats and logging in production. Turn `LOG` on temporarily when troubleshooting.                                            |
| `DOCKET_CACHE_SIGNATURE`                 | `false`    | Removes the Docket Cache HTML comment and response header.                                                                                         |
| `DOCKET_CACHE_CHECKVERSION`              | `false`    | Skips the plugin's critical-version check.                                                                                                         |
| `DOCKET_CACHE_AUTOUPDATE`                | `false`    | Updates come through Avunu's normal update process instead of WordPress auto-updates. If nobody updates the site regularly, leave auto-updates on. |

## Settings Left Out

Older copies of this baseline included constants that no longer do anything on current WordPress:

`DOCKET_CACHE_ADVCPOST` and the related post-type constants: Advanced Post Cache only runs on WordPress 6.1 and older, because core now caches `WP_Query` results itself.

`DOCKET_CACHE_RTIMAGEOVERWRITE`: an internal runtime option that the plugin sets for itself. To keep only one copy of edited images, define WordPress's own `IMAGE_EDIT_OVERWRITE` constant instead.

## Useful Commands

From the WordPress directory:

```
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">cache</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">flush</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">        </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781"># Flush the object cache.</span>
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">cache</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">run:gc</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">       </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781"># Run Docket Cache's garbage collector now.</span>
<span style="--shiki-dark:#FFA657;--shiki-light:#953800">wp</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">cache</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328"> </span><span style="--shiki-dark:#A5D6FF;--shiki-light:#0A3069">status</span><span style="--shiki-dark:#E6EDF3;--shiki-light:#1F2328">       </span><span style="--shiki-dark:#8B949E;--shiki-light:#6E7781"># Show the drop-in status.</span>
```

Sources

- [docs.docketcache.com/constants](https://docs.docketcache.com/constants)
- [github.com/nawawi/docket-cache/blob/master/includes/src/Constans.php](https://github.com/nawawi/docket-cache/blob/master/includes/src/Constans.php)
- [wordpress.org/plugins/docket-cache](https://wordpress.org/plugins/docket-cache/)

Need help with WordPress?

Our notes can take you a long way, but sometimes you'd rather have someone who's done it before.

[Websites](/services/websites/)

[← PreviousAdmin-only custom post types with custom list columns](/kb/wordpress/custom-post-type-admin/)[Next →Gravity Forms](/kb/wordpress/gravity-forms/)

CC0This article is in the public domain ([CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/)), code samples included. Use it however helps you.

On this page

- [Baseline](#baseline)
- [What the Settings Do](#what-the-settings-do)
- [Storage Limits](#storage-limits)
- [Caching Features](#caching-features)
- [Trimmed Features](#trimmed-features)
- [Admin and Maintenance](#admin-and-maintenance)
- [Settings Left Out](#settings-left-out)
- [Useful Commands](#useful-commands)

[Back to top↑](#top)

Services

- [ERP implementation](/services/erp/)
- [Odoo](/services/erp/odoo/)
- [ERPNext](/services/erp/erpnext/)
- [Custom software](/services/custom-software/)
- [Devices & IoT](/services/devices-iot/)
- [Websites](/services/websites/)
- [Infrastructure](/services/infrastructure/)

Resources

- [Our work](/work/)
- [Open source](/open-source/)
- [Knowledge base](/kb/)
- [Insights](/insights/)

Company

- [About](/about/)
- [Team](/about/team/)
- [Partners](/partners/)
- [Contact](/contact/)

Clients

- [Project portal](https://erp.avunu.net/projects)
- [Invoices](https://erp.avunu.net/)
- [Support](https://erp.avunu.net/)

[![Avunu](/brand/avunu-logo-light.svg)](/)[\<av-icon data-jx-static>\<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" stroke="none" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">\<path d="M20.400 20.500h-3.600v-5.600c0-1.300 0-3-1.800-3s-2.100 1.400-2.100 2.900v5.700H9.400V9h3.400v1.600c.5-.9 1.600-1.900 3.400-1.900 3.600 0 4.300 2.400 4.300 5.500v6.300zM5.300 7.400a2.100 2.100 0 1 1 0-4.100 2.100 2.100 0 0 1 0 4.100zm1.800 13.100H3.600V9h3.500v11.500zM22.200 0H1.800C.8 0 0 .8 0 1.700v20.600c0 .9.800 1.700 1.800 1.700h20.400c1 0 1.800-.8 1.800-1.700V1.700C24 .8 23.200 0 22.200 0z">\</path>\</svg>\</av-icon>](https://www.linkedin.com/company/avunu)[\<av-icon data-jx-static>\<svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor" stroke="none" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">\<path d="M12 .3a12 12 0 0 0-3.8 23.4c.6.1.8-.3.8-.6v-2c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.5 1 .1-.8.4-1.3.7-1.6-2.7-.3-5.5-1.3-5.5-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.2 0 0 1-.3 3.3 1.2a11.500 11.500 0 0 1 6 0c2.300-1.500 3.300-1.200 3.300-1.200.6 1.700.2 2.900.1 3.200.8.8 1.200 1.900 1.200 3.200 0 4.600-2.800 5.600-5.500 5.900.4.400.8 1.100.8 2.200v3.300c0 .3.2.7.8.6A12 12 0 0 0 12 .3">\</path>\</svg>\</av-icon>](https://github.com/Avunu)[Client portal](https://erp.avunu.net/projects)[Start a project](/start/)

Avunu LLC · 948 East Philadelphia Street, York, PA 17403 · (717) 814-8540Knowledge base articles are in the public domain[Privacy](/privacy/)[Terms](/terms/)
