Skip to content

Command cli cache prune doesn't clear cache when file timemods are all the same #5467

@kitchin

Description

@kitchin

When I run cli cache prune it does nothing and echos "Success: Cache pruned."
When I run cli cache clear it does remove cache files and echos "Success: Cache cleared."

Adding --debug did not add anything interesting to the output, as far as I could tell.

My environment is a CentOS from root within a perl script, calling with backticks:
sudo -u foo $php /usr/local/bin/wp cli cache prune --path=/home/foo/public_html
where
$php = '/usr/local/bin/php -c ./php-wpcli.ini';

The cache is, for example:
ls -1 /home/foo/.wp-cli/cache/plugin

akismet-4.1.6.zip
autoptimize-2.7.3.zip
classic-editor-1.6.zip
disable-comments-1.11.0.zip
jetpack-8.6.1.zip
jetpack-8.7.1.zip
jetpack-8.9.1.zip
loginizer-1.4.4.zip
loginizer-1.4.8.zip
loginizer-1.6.0.zip
master-slider-3.6.2.zip
page-links-to-3.3.4.zip
wordpress-seo-14.3.zip
wordpress-seo-14.4.1.zip
wordpress-seo-14.5.zip
wordpress-seo-15.0.zip

The file timemods seem to be the date the script ran.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions