- simpleCache<V, Args extends any[]>(
getValue: (args: Args) => V,
): {
cache: LRUCache<string, V>;
getKey: (args: Args) => string;
getValue: (args: Args) => V;
(...args: Args): NonNullable<V>;
} Parameters
- getValue: (args: Args) => V
Returns {
cache: LRUCache<string, V>;
getKey: (args: Args) => string;
getValue: (args: Args) => V;
(...args: Args): NonNullable<V>;
}
Creates a simple memoized function with default settings