betty.cache.memory module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.cache.memory module

Provide caching that stores cache items in volatile memory.

final class betty.cache.memory.MemoryCache

  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)
  with_scope(scope: str) → Self

    Return a new nested cache with the given scope.