/** * Generic cache mechanism for network calls * Caches results based on a key generated from the function parameters * * @example * ```ts * const cachedFetch = createCachedFunction( * async (id: string) => fetchData(id), * (id) => `data-${id}` * ); * * // First call - makes network request * const result1 = await cachedFetch('123'); * * // Second call with same params - returns cached result * const result2 = await cachedFetch('123'); * ``` */ export declare function createCachedFunction(fn: (...args: TArgs) => Promise, keyGenerator: (...args: TArgs) => string): (...args: TArgs) => Promise;