com.jn.agileway.redis.l2cache.RedisCacheFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of agileway-redis-springdata2 Show documentation
Show all versions of agileway-redis-springdata2 Show documentation
Provides a large number of convenient redis tools:
distributed locks,
distributed count,
distributed cache,
distributed id generator,
jdk collection implements,
the enhanced RedisTemplate based on a specified key prefix and the agileway-codec module
package com.jn.agileway.redis.l2cache;
import com.jn.langx.Factory;
public class RedisCacheFactory implements Factory {
@Override
public RedisCache get(RedisCacheContext context) {
RedisCache redisCache = new RedisCache();
redisCache.setLoader(context.getLoader());
redisCache.setRedisTemplate(context.getRedisTemplate());
redisCache.setRemoveListener(context.getRemoveListener());
redisCache.setKeyWrapper(context.getKeyWrapper());
return redisCache;
}
}