Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
refactoring
Michael Peter Christenf5efdb21fd8a
diff --git a/source/de/anomic/crawler/Cache.java b/source/de/anomic/crawler/Cache.javaindex 9bc6047d0..01e5fcc2f 100644--- a/source/de/anomic/crawler/Cache.java+++ b/source/de/anomic/crawler/Cache.java@@ -172,10 +172,6 @@ public final class Cache {* @param url the url of the resource* @return true if the content of the url is in the cache, false otherwise*/- public static boolean has(final DigestURI url) {- return has(url.hash());- }-public static boolean has(final byte[] urlhash) {boolean headerExists;boolean fileExists;@@ -254,12 +250,12 @@ public final class Cache {* @param url* @throws IOException*/- public static void delete(final DigestURI url) throws IOException {+ public static void delete(final byte[] hash) throws IOException {if (responseHeaderDB instanceof MapHeap) {- ((MapHeap) responseHeaderDB).delete(url.hash());+ ((MapHeap) responseHeaderDB).delete(hash);} else {- responseHeaderDB.remove(url.hash());+ responseHeaderDB.remove(hash);}- fileDB.delete(url.hash());+ fileDB.delete(hash);}}diff --git a/source/de/anomic/http/server/HTTPDProxyHandler.java b/source/de/anomic/http/server/HTTPDProxyHandler.javaindex ec4787c9e..54f83ce31 100644--- a/source/de/anomic/http/server/HTTPDProxyHandler.java+++ b/source/de/anomic/http/server/HTTPDProxyHandler.java@@ -502,7 +502,7 @@ public final class HTTPDProxyHandler {final byte[] b = Cache.getContent(url.hash());if (b != null) sizeBeforeDelete = b.length;}- Cache.delete(url);+ Cache.delete(url.hash());conProp.put(HeaderFramework.CONNECTION_PROP_PROXY_RESPOND_CODE, "TCP_REFRESH_MISS");}