UNPKG

layered-loader

Version:

Data loader with support for caching and fallback data sources

17 lines 645 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ManualCache = void 0; const AbstractFlatCache_1 = require("./AbstractFlatCache"); class ManualCache extends AbstractFlatCache_1.AbstractFlatCache { async set(key, newValue) { this.inMemoryCache.set(key, newValue); this.runningLoads.delete(key); if (this.asyncCache) { await this.asyncCache.set(key, newValue).catch((err) => { this.cacheUpdateErrorHandler(err, key, this.asyncCache, this.logger); }); } } } exports.ManualCache = ManualCache; //# sourceMappingURL=ManualCache.js.map