We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 076018f + f524f5a commit 46c3798Copy full SHA for 46c3798
lib/caching.js
@@ -2,8 +2,12 @@
2
/*jshint maxcomplexity:16*/
3
var CallbackFiller = require('./callback_filler');
4
var utils = require('./utils');
5
+var memory = require('./stores/memory.js');
6
+var none = require('./stores/none.js');
7
var parseWrapArguments = utils.parseWrapArguments;
8
9
+var bundledStores = {memory, none};
10
+
11
/**
12
* Generic caching interface that wraps any caching library with a compatible interface.
13
*
@@ -25,7 +29,7 @@ var caching = function(args) {
25
29
}
26
30
} else {
27
31
var storeName = args.store || 'memory';
28
- self.store = require('./stores/' + storeName + '.js').create(args);
32
+ self.store = bundledStores[storeName].create(args);
33
34
35
// do we handle a cache error the same as a cache miss?
0 commit comments