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 OrionisBytecodeCache(FileSystemBytecodeCache): (source)

View In Hierarchy

Undocumented

Method _getCacheFilename Return the absolute path to the cache file for bucket.
Method getCacheKey Convert a template name into a human-readable cache key.
def _getCacheFilename(self, bucket: Bucket) -> str: (source)

Return the absolute path to the cache file for bucket.

Parameters
bucket:BucketJinja2 bucket whose key is the sanitised template name.
Returns
strAbsolute path of the form <cache_dir>/<template_name>.<digest>.cache.
def getCacheKey(self, name: str, filename: str | None = None) -> str: (source)

Convert a template name into a human-readable cache key.

Flattening separators and dropping the extension is a lossy transformation, so distinct templates such as mail/welcome.html and mail/welcome.j2 would share a single cache file. A short digest of the untouched name is appended to keep the mapping injective while the stem stays readable.

Parameters
name:strTemplate identifier (e.g. 'users/index.html').
filename:str or None, optionalAbsolute path on disk; unused here.
Returns
strSanitised key used as the cache filename stem.