From 3d7dd9d3aaa219e656fa42cc3a0eeec0fad0db04 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 1 Oct 2015 13:21:28 +0200 Subject: [PATCH] follow-up to latest commit: also flush the search cache if all crawls had been terminated. --- source/net/yacy/search/Switchboard.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java index 3bd21d71e..1ecbffa5e 100644 --- a/source/net/yacy/search/Switchboard.java +++ b/source/net/yacy/search/Switchboard.java @@ -2492,6 +2492,10 @@ public final class Switchboard extends serverSwitch { } } if (allCrawlsFinished) { + // refresh the search cache + SearchEventCache.cleanupEvents(true); + sb.index.clearCaches(); // every time the ranking is changed we need to remove old orderings + if (postprocessing) { // run postprocessing on all profiles ReferenceReportCache rrCache = index.getReferenceReportCache();