0.2.0 • Published 1 year ago
@blastz/nest-async-cache-dedupe v0.2.0
Nest Async Cache Dedupe
Getting started
Install @blastz/nest-async-cache-dedupe
npm install @blastz/nest-async-cache-dedupeExamples
Register cache module
import { AsyncCacheDedupeModule } from '@blastz/nest-async-cache-dedupe';
@Module({
imports: [AsyncCacheDedupeModule.forRoot()],
})
export class AppModule {}Use cache decorator
class SomeService {
@AsyncCacheDedupe({
ttl: 3,
})
async someMethod(...args: any[]) {
// ...
}
}License
Licensed under MIT