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 2.8.0 to 2.9.0

3

History.md

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

- 2.9.0 2018-03-26
- Fix store's this context for isCacheableValue method (#119). -@alexandrusavin
- 2.8.0 2018-02-28

@@ -2,0 +5,0 @@ - Added link to node-cache-manager-fs-hash - @rolandstarke

2

lib/caching.js

@@ -41,3 +41,3 @@ /** @module cacheManager/caching */

} else if (typeof self.store.isCacheableValue === 'function') {
self._isCacheableValue = self.store.isCacheableValue;
self._isCacheableValue = self.store.isCacheableValue.bind(self.store);
} else {

@@ -44,0 +44,0 @@ self._isCacheableValue = function(value) {

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

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1237,2 +1237,20 @@ // TODO: These are really a mix of unit and integration tests.

});
describe("when using store's isCacheableValue method", function() {
it("should not break its' context", function() {
var store = {
isCacheableValue: function() {
if (this !== store) {
throw new Error("Broken store context");
}
},
get: function() {},
set: function() {},
};
cache = caching({store: store});
assert.doesNotThrow(cache._isCacheableValue);
});
});
});
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