Skip to content

Commit 46c3798

Browse files
authored
Merge pull request jaredwray#191 from ricardomozartlino/master
Remove import from the code in order to be able to bundle and minify the module
2 parents 076018f + f524f5a commit 46c3798

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/caching.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
/*jshint maxcomplexity:16*/
33
var CallbackFiller = require('./callback_filler');
44
var utils = require('./utils');
5+
var memory = require('./stores/memory.js');
6+
var none = require('./stores/none.js');
57
var parseWrapArguments = utils.parseWrapArguments;
68

9+
var bundledStores = {memory, none};
10+
711
/**
812
* Generic caching interface that wraps any caching library with a compatible interface.
913
*
@@ -25,7 +29,7 @@ var caching = function(args) {
2529
}
2630
} else {
2731
var storeName = args.store || 'memory';
28-
self.store = require('./stores/' + storeName + '.js').create(args);
32+
self.store = bundledStores[storeName].create(args);
2933
}
3034

3135
// do we handle a cache error the same as a cache miss?

0 commit comments

Comments
 (0)