Fixed bug which does not allow to create a new cache because the second

had the same name of the first
This commit is contained in:
Luca Frosini 2019-09-27 17:24:34 +02:00
parent 7e1046f63f
commit 56261f96ab
1 changed files with 1 additions and 3 deletions

View File

@ -18,8 +18,6 @@ public abstract class CKANUserCache {
private static final CacheManager cacheManager;
private static final String USERS_CACHE = "userCache";
private static final MutableConfiguration<String,CKANUser> userCacheConfiguration;
private static final Map<String,Cache<String,CKANUser>> userCachePerContext;
@ -42,7 +40,7 @@ public abstract class CKANUserCache {
String context = ContextUtility.getCurrentContext();
Cache<String,CKANUser> userCache = userCachePerContext.get(context);
if(userCache == null) {
userCache = cacheManager.createCache(USERS_CACHE, userCacheConfiguration);
userCache = cacheManager.createCache(context, userCacheConfiguration);
userCachePerContext.put(context, userCache);
}