diff --git a/source/de/anomic/plasma/plasmaWordIndexCache.java b/source/de/anomic/plasma/plasmaWordIndexCache.java index d8bfe6598..eaf57a520 100644 --- a/source/de/anomic/plasma/plasmaWordIndexCache.java +++ b/source/de/anomic/plasma/plasmaWordIndexCache.java @@ -476,6 +476,11 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface { // force flush (sometimes) if (System.currentTimeMillis() % 7 == 4) flushFromMem(); + if (highPriority) { + while (cache.size() > maxWordsHigh) flushFromMem(); + } else { + while (cache.size() > maxWordsLow) flushFromMem(); + } } return added; }