fix: CacheUtils 设置缓存
This commit is contained in:
parent
8f0a5d34ae
commit
df78a85c38
@ -38,7 +38,7 @@ public class CacheUtils {
|
||||
if (getCacheManager() instanceof RedisCacheManager) {
|
||||
RedisTemplate redisTemplate = (RedisTemplate) CommonBeanFactory.getBean("redisTemplate");
|
||||
ValueOperations valueOperations = redisTemplate.opsForValue();
|
||||
valueOperations.setIfPresent(cacheName + "::" + key , value );
|
||||
valueOperations.set(cacheName + "::" + key , value );
|
||||
return;
|
||||
}
|
||||
Element e = new Element(key, value);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user