8000 [Cache][FrameworkBundle] add `cache:pool:invalidate-tags` command by kbond · Pull Request #44692 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

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

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

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

kbond
Copy link
Member
@kbond kbond commented Dec 17, 2021
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

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

@carsonbot carsonbot added this to the 6.1 milestone Dec 17, 2021
@carsonbot carsonbot changed the title [FrameworkBundle][Cache] add cache:pool:invalidate-tags command [Cache][FrameworkBundle] add cache:pool:invalidate-tags command Dec 17, 2021
@kbond kbond force-pushed the invalidate-tags-command branch from 26a25e9 to 4d76aaa Compare December 17, 2021 15:46
@kbond kbond force-pushed the invalidate-tags-command branch 2 times, most recently from df36605 to 2ec674d Compare December 17, 2021 16:50
@nicolas-grekas
Copy link
Member

Please implement the complete() for pools :)

@kbond kbond force-pushed the invalidate-tags-command branch from 2ec674d to 51eb4e5 Compare December 17, 2021 19:08
@kbond
Copy link
Member Author
kbond commented Dec 17, 2021

Thanks for the reviews! I made the following changes:

  1. Implemented complete()
  2. Replaced compiler pass with tagged_locator
  3. Made --pool option an array
  4. Exceptions thrown when invalidating tags are displayed but don't cause the command to fail until all pools are attempted.

@kbond kbond force-pushed the invalidate-tags-command branch from 51eb4e5 to c09579a Compare December 17, 2021 19:24
@kbond kbond force-pushed the invalidate-tags-command branch 5 times, most recently from a5cde83 to f3aadfa Compare December 22, 2021 18:01
@kbond
Copy link
Member Author
kbond commented Dec 22, 2021

Tests added. I believe this PR to be ready.

@chalasr
Copy link
Member
chalasr commented Feb 8, 2022

@kbond can you rebase this one?

@kbond kbond force-pushed the invalidate-tags-command branch from 337d51b to f587a55 Compare February 8, 2022 16:32
@kbond
Copy link
Member Author
kbond commented Feb 8, 2022

Rebased.

@chalasr chalasr force-pushed the invalidate-tags-command branch from f587a55 to 0657f14 Compare February 9, 2022 23:53
@chalasr
Copy link
Member
chalasr commented Feb 9, 2022

Thank you @kbond.

@chalasr chalasr merged commit 34a265c into symfony:6.1 Feb 9, 2022
@kbond kbond deleted the invalidate-tags-command branch February 10, 2022 14:41
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull request Feb 11, 2022
…bond)

This PR was merged into the 6.1 branch.

Discussion
----------

[Cache] document `cache:pool:invalidate-tags` command

Reference: symfony/symfony#44692

Commits
-------

319e5a2 [Cache] document `cache:pool:invalidate-tags` command
@fabpot fabpot mentioned this pull request Apr 15, 2022
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.

[FrameworkBundle] Clear cache pool by tag
6 participants
0