cache-service-cache-module
Advanced tools
Comparing version 0.1.0 to 1.0.0
@@ -85,3 +85,3 @@ /** | ||
var exp = (expiration) ? (expiration * 1000) : self.defaultExpiration; | ||
cache.expirations[key] = Date.now() + expiration; | ||
cache.expirations[key] = Date.now() + exp; | ||
cache.db[key] = value; | ||
@@ -124,8 +124,15 @@ if(cb) cb(); | ||
log(false, 'Attempting to delete keys:', {keys: keys}); | ||
for(var i = 0; i < keys.length; i++){ | ||
var key = keys[i]; | ||
cache.db[key] = undefined; | ||
cache.expirations[key] = undefined; | ||
if(typeof keys === 'object'){ | ||
for(var i = 0; i < keys.length; i++){ | ||
var key = keys[i]; | ||
cache.db[key] = undefined; | ||
cache.expirations[key] = undefined; | ||
} | ||
if(cb) cb(null, keys.length); | ||
} | ||
if(cb) cb(); | ||
else{ | ||
cache.db[keys] = undefined; | ||
cache.expirations[keys] = undefined; | ||
if(cb) cb(null, 1); | ||
} | ||
} | ||
@@ -132,0 +139,0 @@ |
{ | ||
"name": "cache-service-cache-module", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"description": "A cache plugin for cache-service.", | ||
@@ -5,0 +5,0 @@ "main": "cacheModule.js", |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
11426
6
224
0
0
112