UNPKG

@snail-js/api

Version:

Http Request with Decorators Api, build on axios

14 lines (13 loc) 465 B
import { CacheGetData, CacheStorageAdapter } from "../typings"; export default class IndexDBCache implements CacheStorageAdapter { ttl: number; private db?; constructor(ttl: number); init(): Promise<void>; private openDB; get<T = any>(key: string): Promise<CacheGetData<T>>; set<T = any>(key: string, value: T): Promise<boolean>; delete(key: string): Promise<boolean>; clear(): Promise<boolean>; keys(): Promise<string[]>; }