UNPKG

react-simple-api

Version:

Create and cache API requests and responses

10 lines (9 loc) 302 B
declare class ApiCache<T = void> { private apiResponses; private static instance; static getInstance(): ApiCache; getCachedResponse(id: string): T | undefined; setCachedResponse(id: string, data: T, cacheExpiry?: number): T; private deleteCachedResponse; } export { ApiCache };