feat:模块名称调整

This commit is contained in:
曾文豪
2023-01-11 11:21:01 +08:00
parent 61a4a6494a
commit c721e4877f
125 changed files with 56 additions and 56 deletions

View File

@@ -0,0 +1,25 @@
package com.tiesheng.util;
import cn.hutool.cache.CacheUtil;
import cn.hutool.cache.impl.TimedCache;
public class TimedCacheHelper {
private static volatile TimedCache<String, String> timedCache;
/**
* 获取一个默认2分钟过期的缓存
*/
public static TimedCache<String, String> getTimedCache() {
if (timedCache == null) {
synchronized (TimedCacheHelper.class) {
if (timedCache == null) {
timedCache = CacheUtil.newTimedCache(2 * 60 * 1000);
timedCache.schedulePrune(1000);
}
}
}
return timedCache;
}
}