Skip to content

Commit

Permalink
simplify cache check
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalguptaofficial committed Nov 23, 2024
1 parent 51aadbe commit 796c764
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/cache_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 796c764

Please sign in to comment.