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
class ICacheRepository(ABC): (source)
Known subclasses: orionis.cache.CacheRepository
Undocumented
| Async Method | add |
Store value only if key does not already exist. |
| Async Method | clear |
Remove all entries from the store. |
| Async Method | decrement |
Decrement the integer stored at key by amount. |
| Async Method | delete |
Remove key from the store. |
| Async Method | get |
Retrieve the cached value for key. |
| Async Method | get |
Retrieve multiple values at once. |
| Async Method | has |
Check whether key exists and has not expired. |
| Async Method | increment |
Increment the integer stored at key by amount. |
| Async Method | pull |
Return and immediately delete key from the 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 | replace |
Replace a live entry atomically without creating a missing key. |
| Async Method | set |
Store value under key with an optional TTL. |
| Async Method | set |
Store multiple key/value pairs with an optional TTL. |
| Class Variable | __slots__ |
Undocumented |
@abstractmethod
async def add(self, key: str, value: Any, ttl: float | None = None) -> bool:
(source)
¶
overridden in
orionis.cache.CacheRepositoryoverridden in
orionis.cache.CacheRepositoryRemove all entries from the store.
| Returns | |
bool | True on success. |
overridden in
orionis.cache.CacheRepositoryRetrieve the cached value for key.
| Parameters | |
key:str | Cache key. |
| Returns | |
Any | Cached value, or None when absent. |
overridden in
orionis.cache.CacheRepositoryReturn and immediately delete key from the store.
| Parameters | |
key:str | Cache key. |
| Returns | |
Any | Cached value, or None when absent. |
@abstractmethod
async def remember(self, key: str, ttl: float | None, resolver: Callable) -> Any:
(source)
¶
overridden in
orionis.cache.CacheRepositoryReturn the cached value; resolve and cache if absent.
| Parameters | |
key:str | Cache key. |
ttl:float | None | TTL applied when caching the resolved value. |
resolver:Callable | Zero-argument callable (sync or async) producing the value. |
| Returns | |
Any | Cached or freshly computed value. |
overridden in
orionis.cache.CacheRepositoryReturn the cached value; resolve and cache forever if absent.
| Parameters | |
key:str | Cache key. |
resolver:Callable | Zero-argument callable (sync or async) producing the value. |
| Returns | |
Any | Cached or freshly computed value. |
@abstractmethod
async def replace(self, key: str, value: Any, ttl: float | None = None) -> bool:
(source)
¶
overridden in
orionis.cache.CacheRepository@abstractmethod
async def set(self, key: str, value: Any, ttl: float | None = None) -> bool:
(source)
¶
overridden in
orionis.cache.CacheRepository