import { Injectable , CacheOptionsFactory , CacheModuleOptions } from '@nestjs/common' ; @ Injectable ( ) export class CacheService implements CacheOptionsFactory { createCacheOptions ( ) { return { ttl : 5 , max : 10 } ; } }