betty.caches.memory module¶
Provide caching that stores cache items in volatile memory.
- final class betty.caches.memory.MemoryCache¶
Bases:
_CommonCacheBase,GenericProvide a cache that stores cache items in volatile memory.
- async clear() None¶
Clear all items from the cache.
This operation s unsafe and MAY cause other concurrent operations on this cache to fail.
- async delete(cache_item_id: str, /) None¶
Delete the cache item with the given ID.
This operation s unsafe and MAY cause other concurrent operations on this cache to fail.
- async get(cache_item_id: str, /) CacheItem[CacheItemValueT] | None¶
Get the cache item with the given ID.