🏗️ 缓存架构调整, 增强稳定性

This commit is contained in:
zhaojun1998
2020-02-29 15:43:56 +08:00
parent d29c498457
commit 04f94b4bf5
9 changed files with 149 additions and 138 deletions

View File

@@ -89,22 +89,8 @@ public class SystemConfigService {
}
}
boolean oldEnableCache = getEnableCache();
boolean curEnableCache = BooleanUtil.isTrue(systemConfigDTO.getEnableCache());
zFileCache.removeConfig();
systemConfigRepository.saveAll(systemConfigList);
if (!oldEnableCache && curEnableCache) {
log.debug("检测到开启了缓存, 开启预热缓存");
fileCacheService.enableCache();
}
if (oldEnableCache && !curEnableCache) {
log.debug("检测到关闭了缓存, 正在清理缓存数据及关闭自动刷新");
fileCacheService.disableCache();
}
}