Skip to content

Commit 23b6ae8

Browse files
committed
[Security] Avoid having an unremoved, but unused, cache pool
1 parent 7eb58e6 commit 23b6ae8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/LoginLinkFactory.php

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ public function createAuthenticator(ContainerBuilder $container, string $firewal
9898

9999
if (null !== $config['max_uses'] && !isset($config['used_link_cache'])) {
100100
$config['used_link_cache'] = 'security.authenticator.cache.expired_links';
101+
$defaultCacheDefinition = $container->getDefinition($config['used_link_cache']);
102+
if (!$defaultCacheDefinition->hasTag('cache.pool')) {
103+
$defaultCacheDefinition->addTag('cache.pool');
104+
}
101105
}
102106

103107
$expiredStorageId = null;

src/Symfony/Bundle/SecurityBundle/Resources/config/security_authenticator_login_link.php

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
->set('security.authenticator.cache.expired_links')
5252
->parent('cache.app')
5353
->private()
54-
->tag('cache.pool')
5554

5655
->set('security.authenticator.firewall_aware_login_link_handler', FirewallAwareLoginLinkHandler::class)
5756
->args([

0 commit comments

Comments
 (0)