refactor: update getOrSet method definition
This commit is contained in:
+1
-1
@@ -30,8 +30,8 @@ export class AniwatchAPICache {
|
|||||||
* @param expirySeconds set to 60 by default
|
* @param expirySeconds set to 60 by default
|
||||||
*/
|
*/
|
||||||
async getOrSet<T>(
|
async getOrSet<T>(
|
||||||
key: string | Buffer,
|
|
||||||
setCB: () => Promise<T>,
|
setCB: () => Promise<T>,
|
||||||
|
key: string | Buffer,
|
||||||
expirySeconds: number = AniwatchAPICache.DEFAULT_CACHE_EXPIRY_SECONDS
|
expirySeconds: number = AniwatchAPICache.DEFAULT_CACHE_EXPIRY_SECONDS
|
||||||
) {
|
) {
|
||||||
const cachedData = this.isOptional
|
const cachedData = this.isOptional
|
||||||
|
|||||||
Reference in New Issue
Block a user