PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

Feature request: CLI option to clear the results cache

Open jrfnl opened this issue 4 years ago • 2 comments

While testing #2992, I really missed an option to clear the cache, but allow for it to be set.

The --no-cache option only tells PHPCS to not use the cache for that particular run.

It doesn't clear an existing cache file, or in case of the temp directory being used: clear all existing cache files, as those can accumulate to be quite a large number of files quickly.

Please consider this a feature request for a CLI argument to clear the cache(s) to be added.

jrfnl avatar Jun 21 '20 10:06 jrfnl

Would also love to see this option. Also, I can't find where the cache files are being stored. Is there a command to retrieve the cache directory?

frankgraave avatar Feb 25 '22 08:02 frankgraave

I can't find where the cache files are being stored. Is there a command to retrieve the cache directory?

@frankgraave The cache is being stored in the system temp directory, unless you set a specific cache directory either via the command line --cache[=<cacheFile> or set the same in your custom ruleset.

jrfnl avatar Feb 25 '22 09:02 jrfnl