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

Store compiled Jinja templates in the configured bytecode directory.

Method _getCacheFilename Join the configured cache directory with the filename for bucket.
Method getCacheKey Convert a template name into a human-readable cache key.
def _getCacheFilename(self, bucket: Bucket) -> str: (source)

Join the configured cache directory with the filename for bucket.

Parameters
bucket:jinja2.bccache.BucketJinja2 bucket whose key is the sanitised template name.
Returns
strConfigured 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 distinguishes these names while the stem stays readable. Replace Windows-reserved characters and prefix device names so the result remains a portable basename. The truncated digest does not guarantee collision freedom.

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.