/** * Utility class for caching stable data */ export declare class CachedValue { private cachedValue; private cacheTimestamp; private cacheMaxAge; private refreshData; private refreshPromise; /** * @constructor * @param refreshData function that refresh and return the data * @param {number|undefined} cacheMaxAge time in millisecond to expire cache */ constructor(refreshData: (params?: any) => Promise, cacheMaxAge?: number); /** * @private * Validates if internal cache is valid or expired */ private isCacheValid; /** * Returns cached data if valid or request fresh data if cache is invalid * @param params use this params to request data if cache is expired */ getValue(params?: any): Promise; }