Skip to content

Commit 54e9c0a

Browse files
Merge pull request #6626 from verycosy/fix/cache-infinite-ttl
fix(common): change cache ttl decorator to apply non expiring ttl
2 parents d1fc997 + c719611 commit 54e9c0a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/common/cache/interceptors/cache.interceptor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ export class CacheInterceptor implements NestInterceptor {
3737
next: CallHandler,
3838
): Promise<Observable<any>> {
3939
const key = this.trackBy(context);
40-
const ttlValueOrFactory =
41-
this.reflector.get(CACHE_TTL_METADATA, context.getHandler()) || null;
40+
const ttlValueOrFactory = this.reflector.get(CACHE_TTL_METADATA, context.getHandler()) ?? null;
4241

4342
if (!key) {
4443
return next.handle();

0 commit comments

Comments
 (0)