Skip to content

Commit

Permalink
Issue #83: The redirect response cache should be invalidated when the…
Browse files Browse the repository at this point in the history
… config is changing.
  • Loading branch information
claudiu-cristea committed Jun 4, 2019
1 parent 9f0c39d commit fcebdcc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Controller/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fcebdcc

Please sign in to comment.