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 OrionisBytecodeCache(FileSystemBytecodeCache): (source)
Store compiled Jinja templates in the configured bytecode directory.
| Method | _get |
Join the configured cache directory with the filename for bucket. |
| Method | get |
Convert a template name into a human-readable cache key. |
Join the configured cache directory with the filename for bucket.
| Parameters | |
bucket:jinja2.bccache.Bucket | Jinja2 bucket whose key is the sanitised template name. |
| Returns | |
str | Configured path of the form <cache_dir>/<template_name>.<digest>.cache. |
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:str | Template identifier (e.g. 'users/index.html'). |
filename:str or None, optional | Absolute path on disk; unused here. |
| Returns | |
str | Sanitised key used as the cache filename stem. |