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
pull/1/head
hermens 17 years ago
parent eb6bdf49c1
commit d177ceb3b3

@ -458,10 +458,11 @@ public final class plasmaHTCache {
if (file != null) { if (file != null) {
if (filesInUse.contains(file)) continue; if (filesInUse.contains(file)) continue;
log.logFinest("Trying to delete [" + key + "] = old file: " + file.toString()); 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")) { if (deleteFileandDirs(file, "OLD")) {
try { try {
// As the file is gone, the entry in responseHeader.db is not needed anymore // As the file is gone, the entry in responseHeader.db is not needed anymore
String urlHash = getHash(file);
if (urlHash != null) { if (urlHash != null) {
log.logFinest("Trying to remove responseHeader for URLhash: " + urlHash); log.logFinest("Trying to remove responseHeader for URLhash: " + urlHash);
responseHeaderDB.remove(urlHash); responseHeaderDB.remove(urlHash);

Loading…
Cancel
Save