ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Session store backed by the framework's cache system.

Each session is persisted as a single cache entry whose TTL mirrors record.expires_at. Expiry is therefore delegated entirely to the underlying cache backend (file, database, Redis, ...); no in-process bookkeeping or manual sweeping is required.

Notes

ICacheManager exposes no way to enumerate stored keys, so this store cannot (and does not need to) implement an active gc: the backend evicts expired entries on its own.

Method __init__ Bind the store to the requested (or default) cache repository.
Async Method delete Remove the record for session_id (no-op when absent).
Async Method gc No-op: expiry is enforced natively by the cache backend's TTL.
Async Method read Return the stored record for session_id, or None.
Async Method update Replace a live cache session without recreating a missing key.
Async Method write Insert or replace the record keyed by its identifier.
Class Variable __slots__ Undocumented
Instance Variable _repository Undocumented
def __init__(self, cache: ICacheManager, store: str | None = None): (source)

Bind the store to the requested (or default) cache repository.

Parameters
cache:ICacheManagerThe application's cache manager.
store:str | None, optionalName of the cache store to use. None selects the configured default store.
Returns
NoneUndocumented
async def delete(self, session_id: str) -> bool: (source)

Remove the record for session_id (no-op when absent).

Parameters
session_id:strUnique session identifier to remove.
Returns
boolTrue only when an entry was deleted.
async def gc(self): (source)

No-op: expiry is enforced natively by the cache backend's TTL.

Returns
NoneUndocumented
async def read(self, session_id: str) -> SessionRecord | None: (source)

Return the stored record for session_id, or None.

Parameters
session_id:strUnique session identifier to look up.
Returns
SessionRecord | NoneThe stored record, or None when absent or expired.
async def update(self, record: SessionRecord) -> bool: (source)

Replace a live cache session without recreating a missing key.

Parameters
record:SessionRecordReplacement record.
Returns
boolWhether the cache atomically replaced a live record.
async def write(self, record: SessionRecord): (source)

Insert or replace the record keyed by its identifier.

The cache entry's TTL is derived from record.expires_at; a record that has already expired is deleted instead of written.

Parameters
record:SessionRecordThe record to persist.
Returns
NoneUndocumented
_repository: ICacheRepository = (source)

Undocumented