betty.cache.memory module

Provide caching that stores cache items in volatile memory.

final class betty.cache.memory.MemoryCache[source]

Bases: _CommonCacheBase[_CacheItemValueContraT], Generic[_CacheItemValueContraT]

Provide a cache that stores cache items in volatile memory.

__init__(*, scopes: Sequence[str] | None = None, manager: SyncManager | _MemoryCacheState[_CacheItemValueContraT] | None = None)[source]
with_scope(scope: str) Self[source]

Return a new nested cache with the given scope.