UNPKG

@vulcan-sql/core

Version:
26 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.cacheLayerModule = void 0; const tslib_1 = require("tslib"); const types_1 = require("../types"); const inversify_1 = require("inversify"); const cacheLayer_1 = require("../../options/cacheLayer"); require("reflect-metadata"); const cache_layer_1 = require("../../lib/cache-layer/index"); const cacheLayerModule = (options = {}) => new inversify_1.AsyncContainerModule((bind) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { // Options bind(types_1.TYPES.CacheLayerInputOptions).toConstantValue(options); bind(types_1.TYPES.CacheLayerOptions) .to(cacheLayer_1.CacheLayerOptions) .inSingletonScope(); // Cache Layer Loader bind(types_1.TYPES.CacheLayerLoader) .to(cache_layer_1.CacheLayerLoader) .inSingletonScope(); // Cache Layer Refresher bind(types_1.TYPES.CacheLayerRefresher) .to(cache_layer_1.CacheLayerRefresher) .inSingletonScope(); })); exports.cacheLayerModule = cacheLayerModule; //# sourceMappingURL=cacheLayer.js.map