Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Cache] Enable namespace-based invalidation by prefixing keys with backend-native namespace separators#59813
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
ba82917 to1e71a0cComparestof commentedFeb 19, 2025
If |
1e71a0c to0ca7660Comparenicolas-grekas commentedFeb 20, 2025
@stof you're totally right! I removed |
904427d to349fa7bComparenicolas-grekas commentedFeb 20, 2025
Ready. Tests should be green after merge. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
b733583 to80e4605Compareda4eacf tob9b63deCompare…ckend-native namespace separators
b9b63de to81a8cebComparenicolas-grekas commentedMar 13, 2025
PR ready (failures will be fixed by merging) |
nicolas-grekas commentedMar 21, 2025
Any comment @symfony/mergers ? |
kbond left a comment
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.
❤️
6ef1ab4 intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
IndraGunawan commentedMay 29, 2025
thanks for this great feature@nicolas-grekas what type-hint that should we use in the constructor to have this ability with autowiring? or |
nicolas-grekas commentedMay 29, 2025
Can you try using an intersection type of both? That should work! |
IndraGunawan commentedMay 29, 2025
i did (https://symfony-devs.slack.com/archives/C3EQ7S3MJ/p1748498675962069?thread_ts=1748446854.832469&cid=C3EQ7S3MJ) but it does not work [Symfony\Component\DependencyInjection\Exception\RuntimeException] Cannot autowire service"App\Command\TestCommand": argument"$appCache" of method"__construct()" hastype"Symfony\Contracts\Cache\CacheInterface&Symfony\Contracts\Cache\NamespacedPoolInterface" but this class was not found. |
nicolas-grekas commentedMay 29, 2025
Can you open an issue? |
IndraGunawan commentedMay 29, 2025
issue created#60583 |
Uh oh!
There was an error while loading.Please reload this page.
This PR adds a
NamespacedPoolInterfacethat describes how one can add namespace prefixes to cache pool keys.This solves#45599 by allowing to use the
:separator for Redis:Most importantly, this enables namespace-based cache invalidation, typically with namespaces generated by hashing some context.