Sha256: e38b12bc5dd31215d45bb2a68c17bc5b1a7371477cc24124253b2670dcae9e87
Contents?: true
Size: 612 Bytes
Versions: 43
Compression:
Stored size: 612 Bytes
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.cacheWrapper = cacheWrapper; exports.cacheWrapperSync = cacheWrapperSync; async function cacheWrapper(cache, key, fn) { const cached = cache.get(key); if (cached !== undefined) { return cached; } const result = await fn(); cache.set(key, result); return result; } function cacheWrapperSync(cache, key, fn) { const cached = cache.get(key); if (cached !== undefined) { return cached; } const result = fn(); cache.set(key, result); return result; } //# sourceMappingURL=cacheWrapper.js.map
Version data entries
43 entries across 42 versions & 8 rubygems