Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[FrameworkBundle] Clear cache pool by tag #40218

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

Closed
ro0NL opened this issue Feb 17, 2021 · 2 comments · Fixed by #44692
Closed

[FrameworkBundle] Clear cache pool by tag #40218

ro0NL opened this issue Feb 17, 2021 · 2 comments · Fixed by #44692

Comments

@ro0NL
Copy link
Contributor

ro0NL commented Feb 17, 2021

https://symfony.com/doc/current/components/cache/cache_invalidation.html#using-cache-tags

We cannot invalidate cache pools by tag using cache:pool:... CLI commands.

@nicolas-grekas
Copy link
Member

Good idea, PR welcome.

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@ro0NL ro0NL closed this as completed Aug 21, 2021
chalasr added a commit that referenced this issue Feb 9, 2022
…gs` command (kbond)

This PR was squashed before being merged into the 6.1 branch.

Discussion
----------

[Cache][FrameworkBundle] add `cache:pool:invalidate-tags` command

| Q             | A
| ------------- | ---
| Branch?       | 6.1
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #40218
| License       | MIT
| Doc PR        | symfony/symfony-docs#16328

Adds a `cache:pool:invalidate-tags` command.

## Usage

```bash
bin/console cache:pool:invalidate-tags tag1 # invalidates tag1 from all taggable pools
bin/console cache:pool:invalidate-tags tag1 tag2 # invalidates tag1 & tag2 from all taggable pools
bin/console cache:pool:invalidate-tags tag1 tag2 --pool=cache.app # invalidates tag1 & tag2 from cache.app pool
bin/console cache:pool:invalidate-tags tag1 tag2 -p cache1 -p cache2 # invalidates tag1 & tag2 from cache1 & cache2 pools
```

## TODO

- [x] tests
- [x] account for #44682 (once merged up to 6.1)

Commits
-------

0657f14 [Cache][FrameworkBundle] add `cache:pool:invalidate-tags` command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants