UNPKG

@vessl-ai/mcpctl-control-plane

Version:

Vessl MCP Control Plane service for managing distributed jobs.

38 lines 1.33 kB
import { __decorate } from "tslib"; import { CacheModule } from '@nestjs/cache-manager'; import { Module } from '@nestjs/common'; import { ConfigModule, ConfigService } from '@nestjs/config'; import { CacheableMemory } from 'cacheable'; import { Keyv } from 'keyv'; import { AppCacheService } from './appcache.service'; let AppCacheModule = class AppCacheModule { }; AppCacheModule = __decorate([ Module({ providers: [AppCacheService], imports: [ CacheModule.registerAsync({ imports: [ConfigModule], useFactory: async (configService) => { const cacheConfig = configService.get('cache'); if (!cacheConfig) { return {}; } const stores = []; stores.push(new Keyv({ store: new CacheableMemory({ ttl: cacheConfig.defaultCache.ttl ?? 0, }), })); return { stores, }; }, inject: [ConfigService], }), ], exports: [AppCacheService], }) ], AppCacheModule); export { AppCacheModule }; //# sourceMappingURL=appcache.module.js.map