Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow clear:cache to clear all caches at once #26

Open
MoritzLost opened this issue Dec 9, 2022 · 1 comment
Open

Allow clear:cache to clear all caches at once #26

MoritzLost opened this issue Dec 9, 2022 · 1 comment

Comments

@MoritzLost
Copy link

The clear:cache prompts for the name for the cache to clear and defaults to the pages cache. However, there's no way to just clear all caches at once. This would be great to have – for example, to clear all existing caches in a deployment script.

Beyond that, as far as I can tell, the command can only clear caches under cache/[domain]/. For example, kirby clear:cache pages clears the cache/[domain]/pages folder. Is it possible to have the command clear caches that live in the cache/ directory? The Twig plugin stores the compilation cache under cache/twig, but calling kirby clear:cache twig doesn't clear it out.

@afbora
Copy link
Member

afbora commented Feb 22, 2024

Since custom cache folders cannot be called with the $kiby->cache() method, it makes sense to remove the /cache/domain folder when all is selected.

I would also prefer the default to be all instead of pages, so if propmt is left empty the entire /cache/domain folder should be deleted. But this includes breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants