aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2024-12-22 00:43:03 +0530
committerRitesh Ghosh <[email protected]>2024-12-22 00:43:03 +0530
commit64eaa18ed9f87c7fb07377762d11e8f2048bd8d8 (patch)
treef538ac4f0d9cacc21d8319f63178eb896ff1ccd2
parent09c6f2981ab4fb4343e91b533a35e966199c30be (diff)
downloadaniwatch-api-64eaa18ed9f87c7fb07377762d11e8f2048bd8d8.tar.xz
aniwatch-api-64eaa18ed9f87c7fb07377762d11e8f2048bd8d8.zip
refactor: update `getOrSet` method definition
-rw-r--r--src/config/cache.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config/cache.ts b/src/config/cache.ts
index 6953fbc..2f5cf52 100644
--- a/src/config/cache.ts
+++ b/src/config/cache.ts
@@ -30,8 +30,8 @@ export class AniwatchAPICache {
* @param expirySeconds set to 60 by default
*/
async getOrSet<T>(
- key: string | Buffer,
setCB: () => Promise<T>,
+ key: string | Buffer,
expirySeconds: number = AniwatchAPICache.DEFAULT_CACHE_EXPIRY_SECONDS
) {
const cachedData = this.isOptional