From 796c76469cc1b8b7d29fc31f67ff90bb8953db34 Mon Sep 17 00:00:00 2001 From: ujjwalgupta94 Date: Sat, 23 Nov 2024 23:07:38 +0530 Subject: [PATCH] simplify cache check --- src/utils/cache_manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/cache_manager.ts b/src/utils/cache_manager.ts index 5cda7c8..5572f81 100644 --- a/src/utils/cache_manager.ts +++ b/src/utils/cache_manager.ts @@ -33,7 +33,7 @@ export class CacheManager { async get(key: any) { const value = await this.cacheStore_.get(key); if (value) { - if (new Date().getTime() - value.expiry > 0) { + if (new Date().getTime() > value.expiry) { await this.delete(key); return; }