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.
Define the contract for cache manager implementations.
| Async Method | add |
Store value only if key is absent in the default store. |
| Async Method | clear |
Remove all entries from the default store. |
| Async Method | decrement |
Decrement the integer at key in the default store. |
| Async Method | delete |
Remove key from the default store. |
| Async Method | get |
Retrieve the value for key from the default store. |
| Async Method | get |
Retrieve multiple values from the default store. |
| Async Method | has |
Check whether key exists in the default store. |
| Async Method | increment |
Increment the integer at key in the default store. |
| Async Method | pull |
Return and immediately delete key from the default store. |
| Async Method | remember |
Return the cached value; resolve and cache if absent. |
| Async Method | remember |
Return the cached value; resolve and cache forever if absent. |
| Async Method | remember |
Coalesce misses using the configured default store when supported. |
| Async Method | set |
Store value under key in the default store. |
| Async Method | set |
Store multiple key/value pairs in the default store. |
| Method | store |
Return the repository for the named (or default) store. |
Self, key: str, value: Any, ttl: float | None = None) -> bool:
(source)
¶
orionis.cache.CacheManagerStore value only if key is absent in the default store.
| Parameters | |
key:str | Cache key. |
value:typing.Any | Value to store. |
ttl:float | None | Optional TTL in seconds. |
| Returns | |
bool | True on success, False when the key already exists. |
orionis.cache.CacheManagerRemove all entries from the default store.
| Returns | |
bool | True on success. |
orionis.cache.CacheManagerRetrieve the value for key from the default store.
| Parameters | |
key:str | Cache key. |
| Returns | |
typing.Any | Cached value, or None when absent. |
orionis.cache.CacheManagerRetrieve multiple values from the default store.
| Parameters | |
keys:list[str] | Cache keys. |
| Returns | |
dict[str, typing.Any] | Mapping of key → value. |
orionis.cache.CacheManagerReturn and immediately delete key from the default store.
| Parameters | |
key:str | Cache key. |
| Returns | |
typing.Any | Cached value, or None when absent. |
Self, key: str, ttl: float | None, resolver: Callable) -> Any:
(source)
¶
orionis.cache.CacheManagerReturn the cached value; resolve and cache if absent.
| Parameters | |
key:str | Cache key. |
ttl:float | None | TTL applied when caching the resolved value. |
resolver:collections.abc.Callable | Zero-argument callable (sync or async) producing the value. |
| Returns | |
typing.Any | Cached or freshly computed value. |
Self, key: str, resolver: Callable) -> Any:
(source)
¶
orionis.cache.CacheManagerReturn the cached value; resolve and cache forever if absent.
| Parameters | |
key:str | Cache key. |
resolver:collections.abc.Callable | Zero-argument callable (sync or async) producing the value. |
| Returns | |
typing.Any | Cached or freshly computed value. |
Self, key: str, ttl: float | None, resolver: Callable, *, wait_timeout: float = 10, lease: float | None = None) -> Any:
(source)
¶
orionis.cache.CacheManagerCoalesce misses using the configured default store when supported.
| Parameters | |
key:str | Cache or lease key to access. |
ttl:float | None | Entry lifetime in seconds. |
resolver:collections.abc.Callable | Callback that supplies the missing cache value. |
waitfloat | Maximum number of seconds to wait for ownership. |
lease:float | None | Lease lifetime in seconds; use the store default when omitted. |
| Returns | |
typing.Any | Cached value or the result produced by the owning resolver. |
Self, key: str, value: Any, ttl: float | None = None) -> bool:
(source)
¶
orionis.cache.CacheManagerStore value under key in the default store.
| Parameters | |
key:str | Cache key. |
value:typing.Any | Value to cache. |
ttl:float | None | Time-to-live in seconds. None means no expiry. |
| Returns | |
bool | True on success. |
Self, values: dict[ str, Any], ttl: float | None = None) -> bool:
(source)
¶
orionis.cache.CacheManagerStore multiple key/value pairs in the default store.
| Parameters | |
values:dict[str, typing.Any] | Mapping of key → value. |
ttl:float | None | Shared TTL in seconds. |
| Returns | |
bool | True on success. |
orionis.cache.CacheManagerReturn the repository for the named (or default) store.
| Parameters | |
name:str | None | Store name. None selects the configured default. |
| Returns | |
orionis.cache.contracts.ICacheRepository | Repository bound to the requested store. |