cache-manager
Advanced tools
Comparing version 3.6.3 to 4.0.0
@@ -0,1 +1,5 @@ | ||
- 4.0.0 | ||
- Upgrade to lru-cache 7.x (#193). - @orgads | ||
- This has a breaking change in memoryCache.dump(). | ||
- 3.6.3 2022-05-20 | ||
@@ -2,0 +6,0 @@ - Remove import from the code in order to be able to bundle and minify the module (#191) - @ricardomozartlino |
@@ -36,7 +36,9 @@ /*eslint no-unused-vars:0*/ | ||
max: args.max || 500, | ||
maxAge: (ttl || ttl === 0) ? ttl * 1000 : null, | ||
maxSize: args.maxSize, | ||
ttl: (ttl || ttl === 0) ? ttl * 1000 : null, | ||
dispose: args.dispose, | ||
length: args.length, | ||
stale: args.stale, | ||
updateAgeOnGet: args.updateAgeOnGet || false | ||
sizeCalculation: args.sizeCalculation || args.length, | ||
allowStale: args.allowStale || args.stale, | ||
updateAgeOnGet: args.updateAgeOnGet, | ||
updateAgeOnHas: args.updateAgeOnHas | ||
}; | ||
@@ -160,3 +162,3 @@ | ||
args.forEach(function(key) { | ||
lruCache.del(key); | ||
lruCache.delete(key); | ||
}); | ||
@@ -172,3 +174,3 @@ | ||
self.reset = function(cb) { | ||
lruCache.reset(); | ||
lruCache.clear(); | ||
if (cb) { | ||
@@ -182,3 +184,3 @@ process.nextTick(cb.bind(null, null)); | ||
self.keys = function(cb) { | ||
var keys = lruCache.keys(); | ||
var keys = [...lruCache.keys()]; | ||
if (cb) { | ||
@@ -197,3 +199,3 @@ process.nextTick(cb.bind(null, null, keys)); | ||
self.keyCount = function() { | ||
return lruCache.length; | ||
return lruCache.size; | ||
}; | ||
@@ -200,0 +202,0 @@ |
{ | ||
"name": "cache-manager", | ||
"version": "3.6.3", | ||
"version": "4.0.0", | ||
"description": "Cache module for Node.js", | ||
@@ -30,3 +30,3 @@ "main": "index.js", | ||
"lodash.clonedeep": "^4.5.0", | ||
"lru-cache": "6.0.0" | ||
"lru-cache": "^7.10.1" | ||
}, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
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
81315
1632
+ Addedlru-cache@7.18.3(transitive)
- Removedlru-cache@6.0.0(transitive)
- Removedyallist@4.0.0(transitive)
Updatedlru-cache@^7.10.1