Skip to content

Conversation

Man7asP
Copy link
Contributor

@Man7asP Man7asP commented Nov 4, 2021

The WP-CLI file cache can now be configured via the following environment variables:

  • WP_CLI_CACHE_DIR - Directory in which to store the cached files. Default value: "$home/.wp-cli/cache".
  • WP_CLI_CACHE_EXPIRY - Time after which cached files are automatically purged, in seconds. Default value: 15552000 (6 months).
  • WP_CLI_CACHE_MAX_SIZE - Total size of the file cache after which older files are purged, in bytes. Default value: 314572800 (300MB).

Fixes #5574

@Man7asP Man7asP requested a review from a team as a code owner November 4, 2021 14:15
@schlessera schlessera added this to the 2.5.1 milestone Nov 4, 2021
@schlessera schlessera merged commit aa182a8 into wp-cli:master Nov 5, 2021
@schlessera
Copy link
Member

Thanks for the PR, @mn7zDev !

@schlessera schlessera changed the title Cache: Changeable cache size. Make cache size and expiry configurable via environment variables Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache: Change file cache size
2 participants