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 0.2.0 to 0.3.0

4

History.md

@@ -0,1 +1,5 @@

- 0.3.0 2013-12-08
Bound the get, set and del functions to their original “this” context when assigning a store.
(Thanks to Boyan Rabchev)
- 0.2.0 2013-10-31

@@ -2,0 +6,0 @@ Better examples, version bump.

6

lib/caching.js

@@ -51,7 +51,7 @@ var caching = function (args) {

self.get = self.store.get;
self.get = self.store.get.bind(self.store);
self.set = self.store.set;
self.set = self.store.set.bind(self.store);
self.del = self.store.del;
self.del = self.store.del.bind(self.store);

@@ -58,0 +58,0 @@ return self;

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

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

@@ -30,3 +30,3 @@ [![build status](https://secure.travis-ci.org/BryanDonovan/node-cache-manager.png)](http://travis-ci.org/BryanDonovan/node-cache-manager)

(Note, this was inspired by [node-caching](https://github.com/mape/node-caching).)
This is probably the feature you're looking for. As an example, where you might have to do this
This is probably the feature you're looking for. As an example, where you might have to do this:

@@ -58,12 +58,2 @@ ```javascript

}
get_cached_user(user_id, function (err, user) {
// First time fetches the user from the (fake) database:
console.log(user);
get_cached_user(user_id, function (err, user) {
// Second time fetches from cache.
console.log(user);
});
});
```

@@ -70,0 +60,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