Module "project/HasCache"
Functions
retrieveOrCompute
- retrieveOrCompute<T, R>(t: T, key: string, how: (t: T) => R, cache?: boolean): Promise<R>
-
Type parameters
Parameters
-
t: T
-
key: string
-
how: (t: T) => R
-
Default value cache: boolean = true
Returns Promise<R>
Retrieve the value if stored in the cache. Otherwise compute with the given function and store