cache-manager 3.6.2 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/History.md +3 -0
- package/lib/caching.js +5 -1
- package/package.json +1 -1
package/History.md
CHANGED
package/lib/caching.js
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
/*jshint maxcomplexity:16*/
|
|
3
3
|
var CallbackFiller = require('./callback_filler');
|
|
4
4
|
var utils = require('./utils');
|
|
5
|
+
var memory = require('./stores/memory.js');
|
|
6
|
+
var none = require('./stores/none.js');
|
|
5
7
|
var parseWrapArguments = utils.parseWrapArguments;
|
|
6
8
|
|
|
9
|
+
var bundledStores = {memory, none};
|
|
10
|
+
|
|
7
11
|
/**
|
|
8
12
|
* Generic caching interface that wraps any caching library with a compatible interface.
|
|
9
13
|
*
|
|
@@ -25,7 +29,7 @@ var caching = function(args) {
|
|
|
25
29
|
}
|
|
26
30
|
} else {
|
|
27
31
|
var storeName = args.store || 'memory';
|
|
28
|
-
self.store =
|
|
32
|
+
self.store = bundledStores[storeName].create(args);
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
// do we handle a cache error the same as a cache miss?
|