6.0.0 • Published 5 months ago

@eddaic/nestjs-cacheable v6.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

nestjs-cacheable

Simple NestJS Module to add DNS cache using szmarczak/cacheable-lookup.

Installation

npm install @eddaic/nestjs-cacheable

Usage

import { CacheableModule, CacheableService } from '@eddaic/nestjs-cacheable';
import { HttpModule } from '@nestjs/axios';
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';

@Module({
  imports: [
    HttpModule.registerAsync({
      imports: [CacheableModule, ConfigModule],
      inject: [CacheableService, ConfigService],
      useFactory: (cacheable: CacheableService, config: ConfigService) => ({
        baseURL: config.get('MY_URL'),
        lookup: cacheable.lookup(),
      }),
    }),
  ],
  providers: [AppService],
})
export class AppModule {}
3.4.0

9 months ago

3.3.1

9 months ago

3.3.0

9 months ago

3.2.0

9 months ago

5.2.0

7 months ago

5.1.1

7 months ago

5.1.0

7 months ago

5.0.1

7 months ago

5.0.0

7 months ago

6.0.0

5 months ago

1.3.0

11 months ago

4.0.0

8 months ago

1.2.0

12 months ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago