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

class IFileBasedCache(ABC): (source)

View In Hierarchy

Define the contract for file based cache implementations.

Method clear Remove the cache file if it exists.
Method get Retrieve cached data if valid.
Method save Save data to the cache file with metadata.
@abstractmethod
def clear(self) -> bool: (source)

Remove the cache file if it exists.

Returns
boolTrue if the cache file was removed, False if it did not exist.
@abstractmethod
def get(self) -> dict | None: (source)

Retrieve cached data if valid.

Returns
dict or NoneThe cached data if valid, otherwise None.
@abstractmethod
def save(self, data: dict) -> tuple[int, str]: (source)

Save data to the cache file with metadata.

Parameters
data:dictThe data to be cached.
Returns
tuple[int, str]A tuple containing the cache version and the sources hash.