Skip to content

Commit 7ee3ca4

Browse files
[Cache] Enable namespace-based invalidation by prefixing keys with backend-native namespace separators
1 parent 320d587 commit 7ee3ca4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
use Symfony\Component\Yaml\Yaml;
209209
use Symfony\Contracts\Cache\CacheInterface;
210210
use Symfony\Contracts\Cache\CallbackInterface;
211+
use Symfony\Contracts\Cache\NamespacedPoolInterface;
211212
use Symfony\Contracts\Cache\TagAwareCacheInterface;
212213
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
213214
use Symfony\Contracts\HttpClient\HttpClientInterface;
@@ -2576,6 +2577,10 @@ private function registerCacheConfiguration(array $config, ContainerBuilder $con
25762577
$container->registerAliasForArgument($tagAwareId, TagAwareCacheInterface::class, $pool['name'] ?? $name);
25772578
$container->registerAliasForArgument($name, CacheInterface::class, $pool['name'] ?? $name);
25782579
$container->registerAliasForArgument($name, CacheItemPoolInterface::class, $pool['name'] ?? $name);
2580+
2581+
if (interface_exists(NamespacedPoolInterface::class)) {
2582+
$container->registerAliasForArgument($name, NamespacedPoolInterface::class, $pool['name'] ?? $name);
2583+
}
25792584
}
25802585

25812586
$definition->setPublic($pool['public']);

0 commit comments

Comments
 (0)