@httpc/kit
Version:
httpc toolbox for building function-based API with minimal code and end-to-end type safety
15 lines (14 loc) • 560 B
TypeScript
import { ICache } from "./types";
export declare class PrefixCacheDecorator<V = any> implements ICache<V> {
readonly prefix: string;
readonly provider: ICache<V>;
constructor(prefix: string, provider: ICache<V>);
keys(): IterableIterator<string>;
has(key: string): boolean;
get<T extends V = V>(key: string): T | undefined;
set<T extends V = V>(key: string, value: T): void;
delete(key: string): void;
clear(): void;
protected _prefix(key: string): string;
protected _un_prefix(key: string): string;
}