betty.caches.no_op module¶
Provide no-op caching.
- final class betty.caches.no_op.NoOpCache¶
-
Provide a cache that does nothing.
- 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.
- getset(cache_item_id: str, /) AsyncIterator[CacheItemValueSetter[Any] | CacheItem[Any]]¶
Get the cache item with the given ID, or provide a setter to add it within the same atomic operation.
- hasset(cache_item_id: str, /) AsyncIterator[CacheItemValueSetter[Any] | None]¶
Check if a cache item with the given ID exists, and if not, provide a setter to add or update it within the same atomic operation.