Constants
Docket Cache uses constants variable as main configuration methods.
Last updated
Docket Cache uses constants variable as main configuration methods.
Last updated
Updated: 08-Mar-2023 | v22.07.04
Constants are like variables except that once they are defined they cannot be changed or undefined. To change the behaviour of Docket Cache, the following PHP constants can be defined in your wp-config.php
file.
Docket Cache load the configuration by calling Constan::register_default()
method that can be found in file includes/src/Constans.php. Some constant marks as @private and for internal use, changing it may result in unpredictable behaviour.
Default object lifespan in seconds.
Only numbers between 86400 and 2419200 are allowed. Default: 345600 (4 days)
If there is no expire time was set to object or set to 0, Docket Cache will use this setting as an expiration time.
This setting does not apply to cache groups below if the value of seconds is lower than the predefined seconds.
Set the maximum size of the object data in bytes, which can be store in a cache file.
Only size between 1048576 (1MB) and 10485760 (10MB) are allowed. Default: 3145728 (3MB)
The size of the cache file is slightly bigger than the object since it contains Docket Cache metadata and exported as plain PHP code.
Set the maximum size of the cache storage on disk.
The minimum required size is 104857600 bytes (100MB). Default: 524288000 (500MB)
Set the maximum cache file can be store on disk.
Only numbers between 200 and 1000000 are allowed. Default: 50000
Set to true
to enable chunking cache files into smaller directories to avoid an excessive number of cache files in one directory.
Only enable it if you have difficulty clearing the cache manually or experience slowdowns when the cache becomes too large. Default:
Set to true
to allow Docket Cache to monitor the cache file limit in real-time.
Default:
Set to true
to enable excluding empty caches from being stored on disk.
Only enable it if you have an issue with inode/file limits. Default:
Set the cache directory. Default:
Set the configuration directory. Default:
Set the Docket Cache writable directory. Default:
By default, Docket Cache requires writable permission on WordPress wp-content directory for internal use. Defining this constant also change the default path for cache, configuration and object-cache Drop-In. The content path must exist and has proper permission. The object-cache.php
Drop-In file needs to symlink with WordPress wp-content/object-cache.php
or replace with wrapper file.
Please refer to the PHP open_basedir
setting before set this constant.
By default Docket Cache only empty the cache file when expire. Set to true to delete the cache file instead of truncate. Default:
Set to true
to allow Garbage Collector (GC) immediately remove the stale cache abandoned by WordPress, WooCommerce and others after doing cache invalidation.
Default:
Set to true
to enable excluding stale cache created by WordPress, WooCommerce, and others from being stored on disk.
Default:
Only enable it if you have an issue with inode/file limits.
Set the lists of groups cached at the network level in a Multisite setup. Default:
List of cache groups that should not be cached. Default:
List of cache keys that should not be cached. Default: not set.
List of cache groups and keys that should not be cached. Default: not set.
Set to true
or false
to enable or disable cache log.
Default:
The cache log intended to provide information on how the cache works. For performance and security concerns, deactivate if no longer needed.
Set the log file. Default:
Set the log time format when viewing. Available options utc, local, wp. Default:
Set to true
to empty the log file when the object cache is flushed.
Default:
Set the maximum size of the log file in bytes. Default: 10485760 (10MB)
By default, Docket Cache excludes it own process if WP_DEBUG not defined as true.
Set to true
or false
to enable or disable to log all caches.
Default:
Set to true
to enable Advanced Post Cache features that cache WP Queries for a post which results in faster data retrieval and reduced database workload.
Default:
Since version 22.07.04, the Advanced Post Cache feature is only available for WordPress version 6.1 and below. Since it is already implemented in WordPress Core as WP_Query caching.
List of Post Types allowed for Advanced Post Cache. Default:
Since version 22.07.04, this constant only works for WordPress version 6.1 and below.
Set to true to allow all Post Types for Advanced Post Cache. Default:
Since version 22.07.04, this constant only works for WordPress version 6.1 and below.
Enable Database Tables optimization.
Available options: never, daily, weekly, monthly. Default:
Set to true
or false
to enable or disable Suspend WP Options Autoload features.
Default:
Set to true
or false
to enable or disable miscellaneous WordPress performance tweaks.
Default:
Set to true
or false
to enable or disable miscellaneous WooCommerce tweaks.
Default:
WooCommerce Admin or Analytics page is a new JavaScript-driven interface for managing stores.
Set to true to disable WooCommerce Admin feature-related. Default:
Set to true to disable WooCommerce Classic Widget feature. Default:
Set to true to disable WooCommerce meta box in the WordPress Dashboard. Default:
Set to true to disable WooCommerce Cart Fragments feature. Default:
Set to true to enable prevent robots crawling add-to-cart links. Default:
Set to true to disable WooCommerce Extensions Page feature. Default:
Set to true
or false
to enable or disable Post Missed Schedule Tweaks features.
Default:
Set to true
or false
to enable or disable Term Count Queries optimization features.
Default:
Set to true
to enable WordPress Core Query optimization features. Docket Cache will attempt to optimize WordPress core query when enabled.
Default:
Set to true
or false
to enable or disable the Bulk Edit Actions when reaching the listed item limit.
Default:
Set a limit of items listed for Bulk Edit Actions. Default:
Set to true
to enable WordPress Translation Caching features that improve the performance of the Translation function.
Default:
Set to true to enable WordPress Menu Caching features that improve the performance of the WordPress menus generation. Default:
Default Menu Cache lifespan in seconds.
Only numbers between 86400 and 2419200 are allowed. Default: 1209600 (14 days)
Set to true
or false
to enable or disable Docket Cache signature at HTML footer and Server Header.
Default:
Set to true
to enable Object Cache Precaching features that increase cache performance by early loading cached objects based on the current URL.
Default:
Set the maximum precache file can be store on disk.
Only numbers between 100 and 1000000 are allowed. Default: 100
Set the maximum precache keys. Default: 20
Set the maximum precache groups. Default: 20
List of cache groups and keys that should not be precached. Default:
Set to true
or false
to enable or disable cache preloading. If set to true
, this plugin will fetch predefined URL related to the admin page.
The preload only runs when doing a cache flush. Default:
Set to true
or false
to enable or disable Admin Page Loader features.
Default:
By default WordPress stores Transients Cache in Database. When a persistent object cache is available, it switches Transients from Database to the object cache.
Some plugins use Transients not in the right way, they store too big data without expiration time. Without expiration, WordPress will place the Transient in the "alloptions" variable. It will make persistent object caching solutions like Docket Cache unable to handle it.
Set to true
or false
to enable or disable retaining Transients in the Database.
Default:
A list of Transient names is excluded from being stored in the Database. Default:
The Cronbot is an external service that pings your website every hour to keep WordPress Cron running actively. Only site Timezone, URL and version are involved when enabling this service.
Set to true
or false
to enable or disable Cronbot Service.
Default:
Maximum sites allowed in Multisite setup. Default:
Set to true or false to enable or disable the OPcache viewer feature. Default:
Set to true
to enable Docket Cache Garbage Collector action button at Overview screen.
Default:
Set to true
to enable Docket Cache the additional Flush Cache action button on the Configuration screen.
Default:
Set to true
or false
to force enable or disable automatic updates of the Docket Cache.
Default:
The Check Version allows Docket Cache to check any critical future version that requires removing cache files before doing the updates, purposely to avoid error-prone.
Set to true
or false
to enable or disable critical version checking.
Default:
Set to true
or false
to enable or disable to flush the object cache when disabling or uninstalling Docket Cache.
Default:
Set to true
or false
to enable or disable to flush OPcache when disabling or uninstalling Docket Cache.
Set to true
or false
to enable or disable object cache data stats at Overview screen.
Default:
Set to true to disable WordPress XML-RPC and Pingbacks related features. Default:
Set to true to disable WordPress features related to HTML header such as meta generators and feed links to reduce the page size. Default:
Set to true to disable WordPress Emoji feature. Default:
Set to true to disable WordPress Feed feature. Default:
Set to true to disable WordPress Embed feature. Default:
Set to true to disable WordPress Lazy Load feature. Default:
Set to true to disable WordPress Auto-Sitemap feature. Default:
Set to true to disable WordPress Application Passwords feature. Default:
Set to true to disable WordPress Events & News Feed at Dashboard. Default:
Set to true to disable the WordPress Browse Happy HTTP API requests, which checks whether the user needs a browser update. Default:
Set to true to disable the WordPress Serve Happy HTTP API request, which checks whether the user needs to update PHP. Default:
Set to true to disable the WordPress post-via-email functionality. Default:
Set to true to limit HTTP requests in WP-Admin.
This option will block any HTTP requests made by plugins or themes that used wp_remote_post
, wp_remote_get
or wp_remote_request
functions that are not invoked in standard WP-Admin pages like Post, Pages, Plugins, Media and others.
Default:
Set the list of hosts excluded from Limit HTTP requests options. Default:
Set to true to disable Garbage Collector Cron Events. By defining it as true, Docket Cache will not install Cron Event for Garbage Collector. You need to run it manually using wp-cli or a custom Cron Events. Default:
Set to true to disable the Docket Cache object cache feature at runtime. By defining it as true, Docket Cache will ignore to install and uninstall the Drop-in file. Default:
Name | Description |
---|---|