UNPKG

@kwiz/node

Version:

KWIZ utilities and helpers for node applications

13 lines (12 loc) 355 B
export declare function getWithCache<T>(worker: () => Promise<{ success: boolean; value: T; }>, info: { /** seconds */ successCacheDuration: number; /** seconds */ failedCacheDuration?: number; /** must be unique for your call! function name, and parameters */ cacheKey: string; forceRefresh?: boolean; }): Promise<T>;