UNPKG

react-http-fetch

Version:

An http library for React JS built on top of native JS fetch

34 lines (33 loc) 851 B
import { HttpCacheEntry } from './types'; import { HttpCacheStore } from './http-cache-store'; export declare class HttpInMemoryCacheStore implements HttpCacheStore { /** * The local cache providing for a request identifier * the corresponding cached entry. */ private readonly store; /** * @inheritdoc */ get<HttpResponseT>(identifier: string): HttpCacheEntry<HttpResponseT> | undefined; /** * @inheritdoc */ put<HttpResponseT>(identifier: string, entry: HttpCacheEntry<HttpResponseT>): () => void; /** * @inheritdoc */ has(identifier: string): boolean; /** * @inheritdoc */ delete(identifier: string): void; /** * Gets all stored entries. */ entries(): HttpCacheEntry<unknown>[]; /** * @inheritdoc */ flush(): void; }