...
|
...
|
@@ -115,6 +115,7 @@ public class RedisHashCache { |
|
|
if (StringUtils.isEmpty(cacheKey) || StringUtils.isEmpty(hashKey)) {
|
|
|
return null;
|
|
|
}
|
|
|
logger.info("RedisHashCache get ,cacheKey is: {},obj is: {},hashkey {}", cacheKey,obj, hashKey);
|
|
|
RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance().appendFixed(cacheKey).appendVar(obj);
|
|
|
String value = this.hashOperations.get(redisKeyBuilder, hashKey);
|
|
|
if (StringUtils.isEmpty(value)) {
|
...
|
...
|
@@ -185,11 +186,12 @@ public class RedisHashCache { |
|
|
logger.warn("RedisHashCache put failed!!! value {}", v);
|
|
|
return;
|
|
|
}
|
|
|
logger.info("RedisHashCache put, cacheKey is: {},obj is: {},hashkey is {},value is {}", cacheKey,obj, hashKey,value);
|
|
|
RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance().appendFixed(cacheKey).appendVar(obj);
|
|
|
this.hashOperations.put(redisKeyBuilder, hashKey, v);
|
|
|
this.yHRedisTemplate.longExpire(redisKeyBuilder, timeout, unit);
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("RedisHashCache get failed!!! cacheKey is: {},obj is: {},hashkey {}", cacheKey,obj, hashKey);
|
|
|
logger.warn("RedisHashCache get failed!!! cacheKey is: {},obj is: {},hashkey is {},value is {}", cacheKey,obj, hashKey,value);
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|