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:
parent
7e1046f63f
commit
56261f96ab
|
@ -18,8 +18,6 @@ public abstract class CKANUserCache {
|
||||||
|
|
||||||
private static final CacheManager cacheManager;
|
private static final CacheManager cacheManager;
|
||||||
|
|
||||||
private static final String USERS_CACHE = "userCache";
|
|
||||||
|
|
||||||
private static final MutableConfiguration<String,CKANUser> userCacheConfiguration;
|
private static final MutableConfiguration<String,CKANUser> userCacheConfiguration;
|
||||||
|
|
||||||
private static final Map<String,Cache<String,CKANUser>> userCachePerContext;
|
private static final Map<String,Cache<String,CKANUser>> userCachePerContext;
|
||||||
|
@ -42,7 +40,7 @@ public abstract class CKANUserCache {
|
||||||
String context = ContextUtility.getCurrentContext();
|
String context = ContextUtility.getCurrentContext();
|
||||||
Cache<String,CKANUser> userCache = userCachePerContext.get(context);
|
Cache<String,CKANUser> userCache = userCachePerContext.get(context);
|
||||||
if(userCache == null) {
|
if(userCache == null) {
|
||||||
userCache = cacheManager.createCache(USERS_CACHE, userCacheConfiguration);
|
userCache = cacheManager.createCache(context, userCacheConfiguration);
|
||||||
userCachePerContext.put(context, userCache);
|
userCachePerContext.put(context, userCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue