Question · NestJS course · Module 8: Caching and Performance

Cache Decorators on a Controller

Which NestJS decorator is responsible for setting the time-to-live (TTL) of cached data?

Answer options

  • @UseInterceptors(CacheInterceptor)
  • @CacheTTL(300000)
  • @CacheKey('provinces')
  • @Get('provinces')

You can check the correct answer by solving this task in the CodeWorlds game.