Create a memory cache.
Optional cache: CacheEngineThe cache engine to use.
Get a value from the cache. If no key is provided, it returns an object with all key-value pairs in the cache. If a key is provided, it returns the value for that key, or the default value if the key is not in the cache.
Optional key: PathThe key of the item to get.
Optional time: numberOptional timeoutCallback: TimeoutCallbackThe value of the item, or an object with all key-value pairs in the cache.
Get a value from the cache. If no key is provided, it returns an object with all key-value pairs in the cache. If a key is provided, it returns the value for that key, or the default value if the key is not in the cache.
Optional key: PathThe key of the item to get.
Optional defaultValue: TThe default value to return if the key is not in the cache.
The value of the item, or an object with all key-value pairs in the cache.
Merge values into the cache. This method will also notify all subscribers about the merge operation.
Optional values: ImportData = {}The values to merge into the cache.
Optional options: { The options for the merge operation.
Whether to skip duplicate keys.
Get a value from the cache. If no key is provided, it returns an object with all key-value pairs in the cache. If a key is provided, it returns the value for that key, or the default value if the key is not in the cache.
Optional key: PathThe key of the item to get.
Optional time: numberOptional timeoutCallback: TimeoutCallbackThe value of the item, or an object with all key-value pairs in the cache.
Subscribe to changes to a cache item.
The key of the item to subscribe to.
The function to call when the item changes.
The function to call to unsubscribe.
Static denormalizeStatic getStatic normalizeStatic sanitize
Class representing a memory cache.