Skip to content

Commit

Permalink
Issue openeuropa#83: The redirect response cache should be invalidate…
Browse files Browse the repository at this point in the history
…d when the config is changing.
  • Loading branch information
claudiu-cristea committed Jun 4, 2019
1 parent 2e24e02 commit b0ca3fe
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 b0ca3fe

Please sign in to comment.