-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] alias cache.app.taggable
to cache.app
if using cache.adapter.redis_tag_aware
#44673
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
[FrameworkBundle] alias cache.app.taggable
to cache.app
if using cache.adapter.redis_tag_aware
#44673
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ | |
use Symfony\Component\Cache\Adapter\ProxyAdapter; | ||
use Symfony\Component\Cache\Adapter\RedisAdapter; | ||
use Symfony\Component\Cache\Adapter\RedisTagAwareAdapter; | ||
use Symfony\Component\Cache\Adapter\TagAwareAdapter; | ||
use Symfony\Component\Cache\Marshaller\DefaultMarshaller; | ||
use Symfony\Component\Cache\Messenger\EarlyExpirationHandler; | ||
use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; | ||
|
@@ -37,9 +36,6 @@ | |
->public() | ||
->tag('cache.pool', ['clearer' => 'cache.app_clearer']) | ||
|
||
->set('cache.app.taggable', TagAwareAdapter::class) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer keeping this definition as is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And just change to an alias if applicable in the extension? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||
->args([service('cache.app')]) | ||
|
||
->set('cache.system') | ||
->parent('cache.adapter.system') | ||
->public() | ||
|
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.
In theory, any pool can inherit from redis_tag_aware and require making cache.app an alias
Uh oh!
There was an error while loading. Please reload this page.
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.
If I understand you correctly, the same could be said for the non-app cache pools below, correct? (
cache.adapter.redis_tag_aware
is hard-coded)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.
absolutely, recursively also, since pools can derivate from other pools.
Uh oh!
There was an error while loading. Please reload this page.
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.
Ultimately, I don't think there shouldn't be any redis-specific check here at all. As discussed in slack, we should be using a pass to determine if the adapter used is already tag aware and alias/decorate based on that.
What do you think about matching what we do for custom pools now for 5.3 as a bug fix, then adding a more robust system in 6.1?
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.
but the alias is created in the DI extension - the pass doesn't know about 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.
Think I finally understand and I believe #44682 solves.