UNPKG

es-fetcher

Version:

Enhance your frontend application's API implementation and calls with es-fetcher. Simplify and accelerate the process like never before.

25 lines (24 loc) 820 B
/** * In-memory cache for storing fetched data. * @type {Object.<string, any>} */ declare let cacheData: { [url: string]: any; }; /** * Delete cached data based on a URL pattern. * * @param {string} urlPattern - The URL pattern for which you want to clear cached data. This pattern can include wildcards (*) to match multiple URLs. */ declare const deleteMemoryCache: (urlPattern: string) => void; /** * Delete cached data based on an array of URL patterns. * * @param {string[]} urlPatterns - An array of URL patterns to match for cache deletion. */ declare const deleteMemoryCaches: (urlPatterns: string[]) => void; /** * Clear the entire in-memory cache. */ declare const clearMemoryCache: () => void; export { cacheData as memoryCacheData, deleteMemoryCache, deleteMemoryCaches, clearMemoryCache };