Commit 6c23fd3b authored by yanzg's avatar yanzg

缓存自动清除时间

parent 036fa8d9
package com.yanzuoguang.util.cache; package com.yanzuoguang.util.cache;
import com.yanzuoguang.util.extend.ConfigBase;
import com.yanzuoguang.util.thread.ThreadHelper; import com.yanzuoguang.util.thread.ThreadHelper;
import com.yanzuoguang.util.thread.ThreadList; import com.yanzuoguang.util.thread.ThreadList;
...@@ -31,7 +32,7 @@ public class MemoryCacheCenter { ...@@ -31,7 +32,7 @@ public class MemoryCacheCenter {
do { do {
clear(); clear();
// 等待1秒 // 等待1秒
ThreadHelper.sleep(1000 * 5); ThreadHelper.sleep(ConfigBase.MemoryClearTimeout);
} while (true); } while (true);
} }
}); });
......
...@@ -12,6 +12,11 @@ public class ConfigBase { ...@@ -12,6 +12,11 @@ public class ConfigBase {
*/ */
public static final boolean PrintThread = false; public static final boolean PrintThread = false;
/**
* 内存缓存自动清除时间
*/
public static final int MemoryClearTimeout = 5 * 1000;
/** /**
* 写入日志对象 * 写入日志对象
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment