UNPKG

317 BJavaScriptView Raw
1"use strict";
2
3const Cache = require(`./cache`).default;
4
5const caches = new Map();
6
7module.exports = function getCache(name) {
8 let cache = caches.get(name);
9
10 if (!cache) {
11 cache = new Cache({
12 name
13 }).init();
14 caches.set(name, cache);
15 }
16
17 return cache;
18};
19//# sourceMappingURL=get-cache.js.map
\No newline at end of file