@snail-js/api
Version:
Http Request with Decorators Api, build on axios
10 lines (9 loc) • 785 B
TypeScript
import MemoryCache from "./memoryCache";
import LocalStorageCache from "./localstorageCache";
import IndexDBCache from "./indexDBCache";
import { CacheStorageAdapter, CacheStorage, MemoryCacheOption, IndexDBCacheOption, LocalStorageCacheOption, CustomCacheOption, CacheManagementOption } from "../typings";
export declare function createCache<T extends CacheManagementOption>(options: T): CacheStorage;
export declare function createCache<T extends MemoryCacheOption>(optios: T): MemoryCache;
export declare function createCache<T extends LocalStorageCacheOption>(optios: T): LocalStorageCache;
export declare function createCache<T extends IndexDBCacheOption>(optios: T): IndexDBCache;
export declare function createCache<T extends CustomCacheOption>(optios: T): CacheStorageAdapter;