volos-cache-common
Advanced tools
Comparing version 0.9.8 to 0.9.9
@@ -26,2 +26,3 @@ /**************************************************************************** | ||
var debug = require('debug')('cache'); | ||
var _ = require('underscore'); | ||
@@ -65,3 +66,3 @@ var encoder = require('./cache-encoder'); | ||
if (buffer && fromCache) { | ||
if (debugEnabled) { debug('cache hit: ' + key); } | ||
if (debug.enabled) { debug('cache hit: ' + key); } | ||
encoder.setFromCache(buffer, resp); | ||
@@ -72,3 +73,3 @@ } | ||
var populate = function(key, cb) { | ||
if (debugEnabled) { debug('cache miss: ' + key); } | ||
if (debug.enabled) { debug('cache miss: ' + key); } | ||
@@ -90,12 +91,1 @@ var end = resp.end; | ||
}; | ||
var debug; | ||
var debugEnabled; | ||
if (process.env.NODE_DEBUG && /cache/.test(process.env.NODE_DEBUG)) { | ||
debug = function(x) { | ||
console.log('Cache: ' + x); | ||
}; | ||
debugEnabled = true; | ||
} else { | ||
debug = function() { }; | ||
} |
@@ -28,2 +28,3 @@ /**************************************************************************** | ||
var encoder = require('./cache-encoder'); | ||
var debug = require('debug')('cache'); | ||
@@ -60,3 +61,3 @@ function CacheConnect(cache, options) { | ||
if (buffer && fromCache) { | ||
if (debugEnabled) { debug('cache hit: ' + key); } | ||
if (debug.enabled) { debug('cache hit: ' + key); } | ||
return encoder.setFromCache(buffer, resp); | ||
@@ -67,3 +68,3 @@ } | ||
var populate = function(key, cb) { | ||
if (debugEnabled) { debug('cache miss: ' + key); } | ||
if (debug.enabled) { debug('cache miss: ' + key); } | ||
var doCache, content, headers; | ||
@@ -116,12 +117,1 @@ | ||
}; | ||
var debug; | ||
var debugEnabled; | ||
if (process.env.NODE_DEBUG && /cache/.test(process.env.NODE_DEBUG)) { | ||
debug = function(x) { | ||
console.log('Cache: ' + x); | ||
}; | ||
debugEnabled = true; | ||
} else { | ||
debug = function() { }; | ||
} |
{ | ||
"name": "volos-cache-common", | ||
"version": "0.9.8", | ||
"version": "0.9.9", | ||
"main": "lib/cache.js", | ||
@@ -12,2 +12,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"debug": "1.0.x", | ||
"underscore": "1.6.x" | ||
@@ -14,0 +15,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
0
21255
2
412
+ Addeddebug@1.0.x
+ Addeddebug@1.0.5(transitive)
+ Addedms@2.0.0(transitive)