Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Make cache size and expiry configurable via environment variables#5576

Merged
schlessera merged 1 commit into
wp-cli:masterwp-cli/wp-cli:masterfrom
Man7asP:feature/set_cache_ttl_and_sizeMan7asP/wp-cli:feature/set_cache_ttl_and_sizeCopy head branch name to clipboard
Nov 5, 2021
Merged

Make cache size and expiry configurable via environment variables#5576
schlessera merged 1 commit into
wp-cli:masterwp-cli/wp-cli:masterfrom
Man7asP:feature/set_cache_ttl_and_sizeMan7asP/wp-cli:feature/set_cache_ttl_and_sizeCopy head branch name to clipboard

Conversation

@Man7asP

@Man7asP Man7asP commented Nov 4, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.