fix: CacheUtils 设置缓存

This commit is contained in:
taojinlong 2022-04-15 22:47:19 +08:00
parent c613c9278b
commit c15dbf5f14

View File

@ -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);