import { MiddlewareFn } from '@pql/client'; export interface ICacheStorage { read(hash: any): Promise; write(hash: any, value: any): Promise; invalidate(hash: any): Promise; invalidateAll(): Promise; } export declare function cache(storage: ICacheStorage): MiddlewareFn; export declare class DefaultStorage implements ICacheStorage { private cache; constructor(initial?: { [hash: string]: any; }); read(hash: any): Promise; write(hash: any, value: any): Promise; invalidate(hash: any): Promise; invalidateAll(): Promise<{}>; }