From 5826bc467b6f08d2180e84a628631945b3c7fdf4 Mon Sep 17 00:00:00 2001 From: Kamran Abdul Aziz Date: Sun, 29 Nov 2026 20:25:21 +0530 Subject: [PATCH] Say that 0 turns the cache limits off Since WP-CLI 3.0.0, setting WP_CLI_CACHE_EXPIRY or WP_CLI_CACHE_MAX_SIZE to 0 turns that limit off instead of falling back to the default. Add that to both entries. --- references/config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/references/config.md b/references/config.md index 538d9171..ae5d1982 100644 --- a/references/config.md +++ b/references/config.md @@ -375,8 +375,8 @@ WP-CLI's behavior can be changed at runtime through the use of environment varia * `WP_CLI_AUTOCORRECT` - What WP-CLI does when a mistyped command has a close match. By default, it asks `Did you mean ''? [y/n]` when both input and output are a terminal, and otherwise stops with an error that includes the suggestion. Set to `confirm` or `prompt` to always ask, `auto`, `1`, `true`, `yes` or `on` to run the suggested command without asking, or `none`, `0`, `false`, `no` or `off` to always stop with the error. Available since WP-CLI 3.0.0. * `WP_CLI_AUTO_CHECK_UPDATE_DAYS` - Number of days between automatic checks for updates. Default is `1`. * `WP_CLI_CACHE_DIR` - Directory to store the WP-CLI file cache. Default is `~/.wp-cli/cache/`. -* `WP_CLI_CACHE_EXPIRY` - Time in seconds after which files in the WP-CLI file cache expire and are removed. Default is `15552000` (180 days). -* `WP_CLI_CACHE_MAX_SIZE` - Maximum size of the WP-CLI file cache in bytes. WP-CLI periodically trims the cache to this size, removing the least recently accessed files first. Default is `314572800` (300 MB). +* `WP_CLI_CACHE_EXPIRY` - Time in seconds after which files in the WP-CLI file cache expire and are removed. Default is `15552000` (180 days). Since WP-CLI 3.0.0, `0` turns this limit off. +* `WP_CLI_CACHE_MAX_SIZE` - Maximum size of the WP-CLI file cache in bytes. WP-CLI periodically trims the cache to this size, removing the least recently accessed files first. Default is `314572800` (300 MB). Since WP-CLI 3.0.0, `0` turns this limit off. * `WP_CLI_CONFIG_PATH` - Path to the global `config.yml` file. Default is `~/.wp-cli/config.yml`. * `WP_CLI_CUSTOM_SHELL` - Allows the user to override the default `/bin/bash` shell used. * `WP_CLI_DISABLE_AUTO_CHECK_UPDATE` - Disable WP-CLI automatic checks for updates.