Skip to content

Commit

Permalink
fix: id unique pour cache symfony users/me
Browse files Browse the repository at this point in the history
  • Loading branch information
ocruze committed Dec 13, 2024
1 parent 92e3713 commit 112a304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Security/KeycloakUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function loadUser(): User
throw new AuthenticationExpiredException('Failed to fetch user from token', Response::HTTP_UNAUTHORIZED, $th);
}

$apiUser = $this->cache->get('users-me', function (ItemInterface $item) {
$apiUser = $this->cache->get("users-{$keycloakUser->getId()}", function (ItemInterface $item) {
$item->expiresAfter(60);

try {
Expand Down

0 comments on commit 112a304

Please sign in to comment.