From d177ceb3b38fc090fcb8b46d8a58a5743884e017 Mon Sep 17 00:00:00 2001 From: hermens Date: Fri, 25 Jan 2008 21:56:25 +0000 Subject: [PATCH] Fix for growing responseHeader[12].db when using proxyCacheLayout = hash git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4404 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaHTCache.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/plasma/plasmaHTCache.java b/source/de/anomic/plasma/plasmaHTCache.java index 8e6d63bbf..c7b7cc083 100644 --- a/source/de/anomic/plasma/plasmaHTCache.java +++ b/source/de/anomic/plasma/plasmaHTCache.java @@ -458,10 +458,11 @@ public final class plasmaHTCache { if (file != null) { if (filesInUse.contains(file)) continue; log.logFinest("Trying to delete [" + key + "] = old file: " + file.toString()); + // This needs to be called *before* the file is deleted + String urlHash = getHash(file); if (deleteFileandDirs(file, "OLD")) { try { // As the file is gone, the entry in responseHeader.db is not needed anymore - String urlHash = getHash(file); if (urlHash != null) { log.logFinest("Trying to remove responseHeader for URLhash: " + urlHash); responseHeaderDB.remove(urlHash);