
org.xson.tangyuan.cache.helper.RedisCacheHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tangyuan-cache Show documentation
Show all versions of tangyuan-cache Show documentation
tangyuan-cache is a tangase component in the tangyuan framework that provides technical and functional support for caching.
The newest version!
package org.xson.tangyuan.cache.helper;
import org.xson.tangyuan.cache.CacheComponent;
import org.xson.tangyuan.cache.TangYuanCache;
import org.xson.tangyuan.cache.redis.RedisCache;
import org.xson.thirdparty.redis.JedisClient;
public class RedisCacheHelper {
/**
* 从系统容器中获取JedisClient实例
*/
public static JedisClient getJedisClient(String cacheId) {
TangYuanCache tangYuanCache = CacheComponent.getInstance().getCache(cacheId);
if (null != tangYuanCache) {
RedisCache redisCache = (RedisCache) tangYuanCache;
return redisCache.getClient();
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy