Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Allow configuring taggable cache pools#26934
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ostrolucky commentedApr 15, 2018
What is your opinion on making this default? |
nicolas-grekas commentedApr 15, 2018
Tags involve extra round-trips so this cannot be the default IMHO. |
weaverryan commentedApr 16, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Wooooo! So much easier than currently :). It looks like And, is there a way that a user could add tagging to the Update: About the taggable |
nicolas-grekas commentedApr 16, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
A service id can also be given here, where tags will be stored. This would then look like:
not needed as you spotted in#26929: just type-hint |
weaverryan commentedApr 16, 2018
Ah, of course! I think we should keep |
nicolas-grekas commentedApr 20, 2018
Moving to 4.2. |
| $pools[$id] =newReference($id); | ||
| foreach ($clearer->getArgument(0)as$name =>$ref) { | ||
| if ($container->hasDefinition($id = (string)$ref)) { | ||
| $pools[$name] =newReference($id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I found this change a bit hard to read as$id is used in both loops. Can we solve that by renaming one of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
updated
| $definition =newChildDefinition($pool['adapter']); | ||
| if ($pool['tags']) { | ||
| if ($config['pools'][$pool['tags']]['tags'] ??false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Do we really want to fail silently if you misconfigure a cache pool service for the tags by having a typo there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think we can do otherwise: you should be allowed to reference a service you created manually.
For the "typo" case, this will create a Reference to a missing service, so you'll still get an error in the end.
e6be2bf toca4ccb7Comparenicolas-grekas commentedMay 28, 2018
vote pending @symfony/deciders |
…ls (nicolas-grekas)This PR was merged into the 4.2-dev branch.Discussion----------[FrameworkBundle] Allow configuring taggable cache pools| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#25903| License | MIT| Doc PR |symfony/symfony-docs#9652This PR adds a new configuration option for cache pools:```yamlframework: cache: pools: app.taggable_pool: tags: true app.taggable_pool_with_separate_store_for_tags: tags: app.my_pool_for_tags```Commits-------896be4c [FrameworkBundle] Allow configuring taggable cache pools
Uh oh!
There was an error while loading.Please reload this page.
This PR adds a new configuration option for cache pools: