Skip to content

Commit

Permalink
Remove import from the code in order to be able to minify the module
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardomozartlino committed May 20, 2022
1 parent cdf360e commit 1f35081
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/caching.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
/*jshint maxcomplexity:16*/
var CallbackFiller = require('./callback_filler');
var utils = require('./utils');
var memory = require('./stores/memory.js');
var none = require('./stores/none.js');
var parseWrapArguments = utils.parseWrapArguments;

var stores = {memory, none};

This comment has been minimized.

Copy link
@BryanDonovan

BryanDonovan May 20, 2022

Collaborator

Can you please rename stores to builtInStores or bundledStores?


/**
* Generic caching interface that wraps any caching library with a compatible interface.
*
Expand All @@ -25,7 +29,7 @@ var caching = function(args) {
}
} else {
var storeName = args.store || 'memory';
self.store = require('./stores/' + storeName + '.js').create(args);
self.store = stores[storeName].create(args);
}

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

0 comments on commit 1f35081

Please sign in to comment.