Type of the key.
Type of the value.
Type of the cache entry.
Defaults to CacheEntry.
Backend capacity.
When given, cache will not grow above capacity (i.e. will have a fixed size).
If you omit this argument, backend will have a dynamic size.
Number of stored entries.
Iterate over stored entries.
Remove all entries from storage.
Delete entry
.
Entry that needs to be deleted.
Get the CacheEntry associated with key
.
Name of the key.
Check if key
is present in the cache.
Name of the key.
Returns an iterable of stored keys.
Store key with value.
⚠️ WARNING ⚠️
This method should not be used to overwrite value of the key!
You need to query the entry first and update value on the entry object.
Name of the key.
Value associated with key.
Returns an iterable of stored values.
Backend which has a pool of reusable CacheEntry. Pool can have a fixed or dynamic size. If pool has a fixed size, trying to insert keys above that size will result in an error.
Each time key is inserted, a free CacheEntry is taken from pool to hold the value. When key is deleted/expires/cleared, it's according CacheEntry is returned to pool and can be used by another key.