memory¶
- class litestar.stores.memory.MemoryStore[源代码]¶
基类:
StoreIn memory, atomic, asynchronous key/value store.
- __init__() None[源代码]¶
Initialize
MemoryStore
- async set(key: str, value: str | bytes, expires_in: int | timedelta | None = None) None[源代码]¶
Set a value.
- async delete(key: str) None[源代码]¶
Delete a value.
If no such key exists, this is a no-op.
- 参数:
key¶ -- Key of the value to delete