Authored by hugufei

revert RedisCacheUtils

... ... @@ -19,17 +19,17 @@ public class RedisCacheUtils {
if (StringUtils.isBlank(compressedVal)) {
return null;
}
//String uncompressStr = SnappyUtils.uncompress(compressedVal);
return unserializeFromString(compressedVal, clazz);
String uncompressStr = SnappyUtils.uncompress(compressedVal);
return unserializeFromString(uncompressStr, clazz);
}
public static <T> void add(YHValueOperations valueOperations, RedisKeyBuilder redisKeyBuilder, T t, int expiredTimeInMinute) {
String uncompressStr = serializeToString(t);
//String compressedVal = SnappyUtils.compress(uncompressStr);
if (StringUtils.isBlank(uncompressStr)) {
String compressedVal = SnappyUtils.compress(uncompressStr);
if (StringUtils.isBlank(compressedVal)) {
return;
}
valueOperations.set(redisKeyBuilder, uncompressStr, expiredTimeInMinute, TimeUnit.MINUTES);
valueOperations.set(redisKeyBuilder, compressedVal, expiredTimeInMinute, TimeUnit.MINUTES);
}
public static boolean exist(YHRedisTemplate redisTemplate, RedisKeyBuilder redisKeyBuilder) {
... ...