Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cache-manager

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-manager - npm Package Compare versions

Comparing version 3.6.3 to 4.0.0

4

History.md

@@ -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

18

lib/stores/memory.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc