From 6a6d9ad87f3baa0332dbcc349cc8c3f3f9b4cb82 Mon Sep 17 00:00:00 2001 From: Marina Shchukina Date: Tue, 7 Jun 2016 12:35:36 +0100 Subject: [PATCH 1/2] Adding a debugger message when no errors and cache is hit --- lib/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/index.js b/lib/index.js index 0738cca..0828974 100644 --- a/lib/index.js +++ b/lib/index.js @@ -101,6 +101,7 @@ HttpCache.prototype = { return self._makeRequest(requestUrl, options, key, null, requestStartTime, callback, next); } + debug('All working fine, cache hit'); self.stats.increment(['hit', 'hit.fresh']); if (cachedContent.backendResponseTime) { From 40f85e3812f10f25824bca7d9d1fd6527efd40e0 Mon Sep 17 00:00:00 2001 From: Marina Shchukina Date: Wed, 8 Jun 2016 09:56:46 +0100 Subject: [PATCH 2/2] Cache hit debug message now contains request url --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index 0828974..9e42357 100644 --- a/lib/index.js +++ b/lib/index.js @@ -101,7 +101,7 @@ HttpCache.prototype = { return self._makeRequest(requestUrl, options, key, null, requestStartTime, callback, next); } - debug('All working fine, cache hit'); + debug('Cache hit for %s', requestUrl); self.stats.increment(['hit', 'hit.fresh']); if (cachedContent.backendResponseTime) {