Socket
Socket
Sign inDemoInstall

cache-manager

Package Overview
Dependencies
Maintainers
1
Versions
104
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.2.1 to 3.3.0

3

History.md

@@ -0,1 +1,4 @@

- 3.3.0 2020-04-30
- Use full lodash lib instead of lodash.clonedeep npm (#141)
- 3.2.1 2020-03-20

@@ -2,0 +5,0 @@ - Background refresh fixes (#139). -@marcoreni

2

lib/stores/memory.js
/*eslint no-unused-vars:0*/
var Lru = require("lru-cache");
var cloneDeep = require('lodash.clonedeep');
var cloneDeep = require('lodash/cloneDeep');
var utils = require('../utils');

@@ -5,0 +5,0 @@ var isObject = utils.isObject;

{
"name": "cache-manager",
"version": "3.2.1",
"version": "3.3.0",
"description": "Cache module for Node.js",

@@ -23,4 +23,4 @@ "main": "index.js",

"dependencies": {
"lodash.clonedeep": "4.5.0",
"async": "1.5.2",
"lodash": "^4.17.15",
"lru-cache": "4.0.0"

@@ -27,0 +27,0 @@ },

@@ -1465,7 +1465,6 @@ // TODO: These are really a mix of unit and integration tests.

return 'OK';
})
.then(function(res) {
assert.equal(res, 'OK');
done();
});
}).then(function(res) {
assert.equal(res, 'OK');
done();
});
});

@@ -1478,7 +1477,17 @@

});
})
.then(function(res) {
assert.equal(res, 'OK');
done();
}).then(function(res) {
assert.equal(res, 'OK');
done();
});
});
it("should be able use a ttl while chaining cache function as a promise", function(done) {
cache.wrap('key', function() {
return new Promise(function(resolve) {
resolve('OK');
});
}, {ttl: 10}).then(function(res) {
assert.equal(res, 'OK');
done();
});
});

@@ -1491,9 +1500,7 @@

});
})
.then(function() {
done(new Error('It should not call then since there is an error in the cache function!'));
})
.catch(function() {
done();
});
}).then(function() {
done(new Error('It should not call "then" since there is an error in the cache function!'));
}).catch(function() {
done();
});
});

@@ -1504,7 +1511,6 @@

return;
})
.then(function(res) {
assert.equal(res, undefined);
done();
});
}).then(function(res) {
assert.equal(res, undefined);
done();
});
});

@@ -1511,0 +1517,0 @@ });

@@ -52,3 +52,3 @@ var assert = require('assert');

cache.wrap(key, function(cacheCb) {
cacheCb(null, {foo: 'bar'});
cacheCb(null, {foo: 'bar', arr: [1, 2, 3]});
}, opts, cb);

@@ -114,2 +114,3 @@ }

assert.equal(result.foo, 'bar');
assert.deepEqual(result.arr, [1, 2, 3]);
done();

@@ -116,0 +117,0 @@ });

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