Pull request #650: RED-6224: Enabled multitenancy for redis cache

Merge in RED/persistence-service from RED-6224 to master

* commit '5b7a6d5a4838fae44d20daf0ce29f39662b2484e':
  RED-6224: Enabled multitenancy for redis cache
This commit is contained in:
Dominique Eiflaender 2023-03-30 15:07:50 +02:00
commit 8972e81d3a
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,5 @@
package com.iqser.red.keycloak.commons;
import java.time.Duration;
import org.springframework.boot.autoconfigure.cache.RedisCacheManagerBuilderCustomizer;
@ -15,6 +14,7 @@ public class DefaultKeyCloakCommonsConfiguration {
public static final String USERS_CACHE = "users";
@Bean
public RedisCacheManagerBuilderCustomizer redisUserCacheManagerBuilderCustomizer() {

View File

@ -33,7 +33,7 @@ public class UserListingService {
private final RetryTemplate retryTemplate = RetryTemplate.builder().maxAttempts(3).exponentialBackoff(1000, 2, 5000).build();
@Cacheable(value = USERS_CACHE, key = "'tenantId'")
@Cacheable(value = USERS_CACHE, key = "#tenantId")
public List<User> getAllUsers(String tenantId) {
return retryTemplate.execute(context -> {