Authored by unknown

代码优化

... ... @@ -221,19 +221,6 @@ public class RedisHashCache {
}
}
/**
* 判断值是否存在
* @param cacheKey
* @return
*/
public Boolean hasKey(String cacheKey) {
logger.debug("Enter hasKey hashOperation redis. cacheKey is {}", cacheKey);
try {
return yHRedisTemplate.hasKey(cacheKey);
} catch (Exception e) {
logger.warn("get haskey method fail!! e {}", e);
}
return false;
}
}
... ...
... ... @@ -47,7 +47,8 @@ public class RedisTemplate {
* @return
*/
public void delete(String key) {
yHRedisTemplate.delete(key);
RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance().appendFixed(key);
yHRedisTemplate.delete(redisKeyBuilder);
}
... ...