|
|
|
@ -2,6 +2,8 @@ package com.shxy.xymanager_framework.timeTask;
|
|
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.zhiping.PulliceModel;
|
|
|
|
|
import com.shxy.xymanager_service.service.NewCacheService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
@ -9,6 +11,7 @@ import javax.annotation.Resource;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class ClearCacheTask {
|
|
|
|
|
|
|
|
|
|
public static HashMap<Integer, Long> reportCountMap = new HashMap<>();
|
|
|
|
@ -37,4 +40,9 @@ public class ClearCacheTask {
|
|
|
|
|
lowVoltMap.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 2 0,12 * * ?")
|
|
|
|
|
@CacheEvict(cacheNames = {"permissionfull", "permissionover", "fulltree", "cacheTerminalMap", "termAndchannelMap", "cacheTower"}, allEntries = true)
|
|
|
|
|
public void clearAllCache() {
|
|
|
|
|
log.info("清空全部缓存.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|