refactor: update getOrSet method definition

This commit is contained in:
Ritesh Ghosh
2024-12-22 00:43:03 +05:30
parent 09c6f2981a
commit 64eaa18ed9
+1 -1
View File
@@ -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