refactoring

pull/2485/head
Nikita Koksharov 5 years ago
parent 6a7ed0b3b1
commit c3283627db

@ -105,12 +105,16 @@ public class RedissonCache implements Cache {
}
RedissonClient redisson = Redisson.create(cfg);
mapCache = redisson.getMapCache(id);
mapCache = getMapCache(redisson);
if (maxSize > 0) {
mapCache.setMaxSize(maxSize);
}
}
protected RMapCache<Object, Object> getMapCache(RedissonClient redisson) {
return redisson.getMapCache(id);
}
private void check() {
if (mapCache == null) {
throw new IllegalStateException("Redisson config is not defined");

Loading…
Cancel
Save