# new Cache(valueFn)
Parameters:
Name | Type | Description |
---|---|---|
valueFn |
function | the function called to update the cached value |
Members
Methods
# static memoize() → {function}
Convenience method to wrap a function in a Cache so that it is memoized.
Properties:
Name | Type | Description |
---|---|---|
fn |
function | the function to be wrapped |
a memoized version of the function
# execute() → {any}
Execute the value function if it needs to be updated based on any dependent Tracked it encounters.
the cached value of the previous execution