Merge pull request #13038 from dataease/pr@dev-v2@perf_redis_cache

perf: 集群环境redis缓存优化
This commit is contained in:
fit2cloud-chenyw
2024-10-31 12:01:02 +08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -70,10 +70,11 @@ public class RedisCacheImpl implements DECacheService {
@Override
public void keyRemove(String cacheName, String key) {
// redisTemplate.delete(cacheName + SEPARATOR + key);
Cache cache = getCacheManager().getCache(cacheName);
if (null == cache) return;
cache.evictIfPresent(key);
cache.clear();
redisTemplate.delete(cacheName + SEPARATOR + key);
}
@PostConstruct