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:
commit
8972e81d3a
@ -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() {
|
||||
|
||||
|
||||
@ -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 -> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user