lincd
Version:
LINCD is a JavaScript library for building user interfaces with linked data (also known as 'structured data', or RDF)
12 lines (11 loc) • 437 B
TypeScript
/**
* Caches the result of a function call based on its arguments for a specified time.
* Arguments are converted to strings for comparison.
* Use cacheTimeMs = 0 to disable caching.
* Use cacheTimeMs = Infinity to never expire the cache.
* @param fn
* @param args
* @param cacheTimeMs
* @param alsoCacheErrors
*/
export declare function cached(fn: () => any, args: any[], cacheTimeMs?: number, alsoCacheErrors?: boolean): any;