From dd241d03bb014449cc63237a932911a0fb6cd1ee Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Fri, 7 Dec 2012 02:00:12 +0100 Subject: [PATCH] latency fix: only set last-visit time if access was actually by the robot --- source/net/yacy/crawler/retrieval/HTTPLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/yacy/crawler/retrieval/HTTPLoader.java b/source/net/yacy/crawler/retrieval/HTTPLoader.java index 031ead94e..1550c56d0 100644 --- a/source/net/yacy/crawler/retrieval/HTTPLoader.java +++ b/source/net/yacy/crawler/retrieval/HTTPLoader.java @@ -74,7 +74,7 @@ public final class HTTPLoader { public Response load(final Request entry, final int maxFileSize, final BlacklistType blacklistType) throws IOException { final long start = System.currentTimeMillis(); final Response doc = load(entry, DEFAULT_CRAWLING_RETRY_COUNT, maxFileSize, blacklistType); - Latency.updateAfterLoad(entry.url(), System.currentTimeMillis() - start); + if (!doc.fromCache()) Latency.updateAfterLoad(entry.url(), System.currentTimeMillis() - start); return doc; }