Added #1875 Remove no longer accessed items from cache after certain amount of time

This commit is contained in:
Jindra Petřík
2022-11-17 08:49:30 +01:00
parent 77a6b6a019
commit 202e66ea1d
12 changed files with 103 additions and 19 deletions

View File

@@ -27,9 +27,9 @@ import com.jpexs.helpers.Cache;
*/
public class AS2Cache {
private final Cache<ASMSource, HighlightedText> cache = Cache.getInstance(true, false, "as2");
private final Cache<ASMSource, HighlightedText> cache = Cache.getInstance(true, false, "as2", false);
private final Cache<ASMSource, ActionList> pcodeCache = Cache.getInstance(true, true, "as2pcode");
private final Cache<ASMSource, ActionList> pcodeCache = Cache.getInstance(true, true, "as2pcode", false);
public void clear() {
pcodeCache.clear();

View File

@@ -26,7 +26,7 @@ import com.jpexs.helpers.Cache;
*/
public class AS3Cache {
private final Cache<ScriptPack, HighlightedText> cache = Cache.getInstance(true, false, "as3");
private final Cache<ScriptPack, HighlightedText> cache = Cache.getInstance(true, false, "as3", false);
public void clear() {
cache.clear();