betty.stores.memory module

Key-value stores that store items in volatile memory.

final class betty.stores.memory.MemoryStore

Bases: _MemoryStore, Generic

A key-value store that stores items in volatile memory.

final class betty.stores.memory.TransientMemoryStore

Bases: _MemoryStore, TransientStore, Generic

A key-value store that stores items in volatile memory.

async clear() None

Clear all items from the store.

This operation s unsafe and MAY cause other concurrent operations on this store to fail.

async delete(key: str, /) None

Delete the item with the given key.

This operation s unsafe and MAY cause other concurrent operations on this store to fail.