with-simple-caching
Version:
A wrapper that makes it simple to add caching to any function
10 lines (9 loc) • 513 B
TypeScript
export type KeySerializationMethod<LI> = (args: {
forInput: LI;
}) => string;
export declare const noOp: <LO, CV>(value: LO) => CV;
export declare const defaultKeySerializationMethod: KeySerializationMethod<any>;
export declare const defaultValueSerializationMethod: <LO, CV>(value: LO) => CV;
export declare const defaultValueDeserializationMethod: <LO, CV>(value: LO) => CV;
export declare const defaultShouldBypassGetMethod: () => boolean;
export declare const defaultShouldBypassSetMethod: () => boolean;