type cachedRemoteDataArgs = { remoteUrl: string; storageKey: string; expiration?: number; }; export declare const cachedDataFetcherWithExpiration: ({ fetcher, storageKey, expiration }: { fetcher: () => Promise; storageKey: string; expiration?: number | undefined; }) => Promise; /** * Retrieves data from storage layer if it exists and is not expired, otherwise fetches data from a remote URL and caches it in storage layer. * * @async * @function cachedRemoteData * @param {Object} args - An object containing the arguments for the function. * @param {string} args.remoteUrl - The URL to fetch the data from if it is not in storage layer. * @param {string} args.storageKey - The key to use when storing the data in storage layer. * @param {number} [args.expiration=86400000] - The number of milliseconds before the cached data expires. Defaults to 86400000 (1 day). * @returns {Promise} Returns a Promise that resolves with the cached data if it exists and is not expired, otherwise it resolves with the data fetched from the remote URL. */ export declare const cachedRemoteDataWithExpiration: ({ remoteUrl, storageKey, expiration }: cachedRemoteDataArgs) => Promise; /** * Retrieves data from storage layer if it exists and is not expired, otherwise fetches data from a remote URL and caches it in storage layer. * * @async * @function cachedRemoteData * * @param {Object} args - An object containing the arguments for the function. * @param {string} args.remoteUrl - The URL to fetch the data from if it is not in storage layer. * @param {string} args.storageKey - The key to use when storing the data in storage layer. * * Read more about caching here - https://developer.mozilla.org/en-US/docs/Web/API/Request/cache */ export declare const cachedRemoteDataWithLastModified: ({ remoteUrl, storageKey }: cachedRemoteDataArgs) => Promise; export {};