Get a value from the cache or generate it if not available. Synchronous version.
value generator
execution context, if provided:
the value, either retrieved or created
Get a value from the cache or generate it if not available. Asynchronous version.
execution context, if provided:
Observable on value, either retrieved or created
Get a value from the cache or generate it if not available. Synchronous version.
value generator
execution context, if provided:
, value: the value (either retrieved or created), fromCache: true if the value was in the cache
Get a value from the cache or generate it if not available. Asynchronous version.
execution context, if provided:
Observable on [value, fromCache], value: the value (either retrieved or created), fromCache: true if the value was in the cache
Set the maximum number of items of the store
maximum number of items
Generated using TypeDoc
Cache
The class Cache represents as store of values that can be retrieves from keys.
There are two kind of keys:
Usage of ReferenceKey should be preferred whenever possible (it does not involves serialization). In practice:
Every [[ModuleFlux | module]] contains an instance of this class, it is provided as second argument of an input's onTriggered callback.