Memoization Cache.
Return all of the cached keys.
Copy
const keys = getMemoizeCache(obj)?.keys()
The cache's keys.
Return the size of the cache.
const size = getMemoizeCache(obj).?size ?? 0 Copy
const size = getMemoizeCache(obj).?size ?? 0
The size of the cache.
Clear all entries from the cache.
getMemoizeCache(obj)?.clear() Copy
getMemoizeCache(obj)?.clear()
Get an item from the cache.
const myAge = getMemoizeCache(obj)?.get('age') Copy
const myAge = getMemoizeCache(obj)?.get('age')
name of item to retrieve.
item or undefined.
Return true if the item exists in the cache.
const isInCache = !!getMemoizeCache(obj)?.has('age') Copy
const isInCache = !!getMemoizeCache(obj)?.has('age')
name of cached item to lookup.
true if an item is in cache.
Dump the value to the local console output.
Optional
An optional message to display before the value.
The value instance.
Returns if the cache is empty.
True if the cache is empty.
Removes an item from the cache by name.
getMemoizeCache(obj).delete('memoizedElementName') Copy
getMemoizeCache(obj).delete('memoizedElementName')
cached item name to remove
true if an item is successfully removed.
Set an item in the cache.
getMemoizeCache(obj)?.set('age', 123) Copy
getMemoizeCache(obj)?.set('age', 123)
name of cached item.
cached item.
The cache item.
Return a copy of the cache as an object.
const obj = getMemoizeCache(obj)?.toObj() Copy
const obj = getMemoizeCache(obj)?.toObj()
The cached values.
Memoization Cache.