Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
devsargam committed Mar 15, 2024
1 parent 2bf6062 commit a7419cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Empty file added .gitkeep
Empty file.
11 changes: 7 additions & 4 deletions src/db/Cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ export class Cache {
return this.instance;
}

set(type: string, args: string[], value: any, expirySeconds: number = parseInt(process.env.CACHE_EXPIRE_S || '100', 10)) {
set(
type: string,
args: string[],
value: any,
expirySeconds: number = parseInt(process.env.CACHE_EXPIRE_S || '100', 10),
) {
this.inMemoryDb.set(`${type} ${JSON.stringify(args)}`, {
value,
expiry: new Date().getTime() + expirySeconds * 1000,
Expand All @@ -46,7 +51,5 @@ export class Cache {
return entry.value;
}

evict() {

}
evict() {}
}

0 comments on commit a7419cd

Please sign in to comment.