🐛 修复更改策略时, 未正确启用和关闭缓存的 BUG

This commit is contained in:
zhaojun1998
2020-01-12 11:14:20 +08:00
parent f6c5f7a91b
commit 594246127d
2 changed files with 7 additions and 6 deletions

View File

@@ -60,6 +60,7 @@ public class AdminController {
systemConfigService.updateSystemConfig(systemConfigDTO);
if (!Objects.equals(currentStorageStrategy, systemConfigDTO.getStorageStrategy())) {
log.info("已将存储策略由 {} 切换为 {}", currentStorageStrategy, systemConfigDTO.getStorageStrategy());
refreshStorageStrategy();
}
@@ -136,9 +137,8 @@ public class AdminController {
} else {
AbstractFileService fileService = systemConfigService.getCurrentFileService();
fileService.init();
log.info("当前启用存储类型: {}", storageStrategy.getDescription());
log.info("切换至存储类型: {}", storageStrategy.getDescription());
// if 判断是否开启搜索.
fileAsyncCacheService.cacheGlobalFile();
}
}