From a56fefe0d3480f6c91ecfd1d8b401af6a0a47800 Mon Sep 17 00:00:00 2001 From: orbiter Date: Tue, 24 Jan 2006 16:24:15 +0000 Subject: [PATCH] added missing forced-flush for index cache see http://www.yacy-forum.de/viewtopic.php?p=15732#15732 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1434 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaWordIndexCache.java | 5 +++++ 1 file changed, 5 insertions(+) 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; }