From fcebdcc37ae97ce51e4ee2ae456c952967515e14 Mon Sep 17 00:00:00 2001 From: Claudiu Cristea Date: Tue, 4 Jun 2019 17:11:17 +0300 Subject: [PATCH] Issue #83: The redirect response cache should be invalidated when the config is changing. --- src/Controller/RegisterController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Controller/RegisterController.php b/src/Controller/RegisterController.php index cc03a2e0..40c61921 100644 --- a/src/Controller/RegisterController.php +++ b/src/Controller/RegisterController.php @@ -62,8 +62,9 @@ public function register(): TrustedRedirectResponse { $url = $this->getRegisterUrl()->toString(); $response = new TrustedRedirectResponse($url); - $cache = new CacheableMetadata(); - $cache->addCacheContexts(['user.roles:anonymous']); + $cache = (new CacheableMetadata()) + ->addCacheContexts(['user.roles:anonymous']) + ->setCacheTags(['config:oe_authentication.settings']); $response->addCacheableDependency($cache); return $response;