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

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

Merged
merged 1 commit into from Feb 9, 2022

Conversation

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

  • tests
  • account for #44682 (once merged up to 6.1)

@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 Dec 17, 2021
@kbond kbond force-pushed the invalidate-tags-command branch 2 times, most recently from df36605 to 2ec674d Compare Dec 17, 2021
@nicolas-grekas
Copy link

@nicolas-grekas nicolas-grekas commented Dec 17, 2021

Please implement the complete() for pools :)

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

@kbond 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 Dec 17, 2021
@kbond kbond force-pushed the invalidate-tags-command branch 5 times, most recently from a5cde83 to f3aadfa Compare Dec 22, 2021
@kbond
Copy link
Author

@kbond kbond commented Dec 22, 2021

Tests added. I believe this PR to be ready.

@94noni
Copy link

@94noni 94noni commented Dec 27, 2021

nice addition :)
May I ask you if #37880 could be reconsidered for v6? thank you

@chalasr
Copy link

@chalasr 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 Feb 8, 2022
@kbond
Copy link
Author

@kbond kbond commented Feb 8, 2022

Rebased.

@chalasr
Copy link

@chalasr chalasr commented Feb 9, 2022

Thank you @kbond.

@chalasr chalasr merged commit 34a265c into symfony:6.1 Feb 9, 2022
7 of 9 checks passed
@kbond kbond deleted the invalidate-tags-command branch Feb 10, 2022
javiereguiluz added a commit to symfony/symfony-docs that referenced this issue 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.

7 participants