Classes
CachingMixin
2
▼
Mixin for compiling cache and filter-block statements.
Host attributes and cross-mixin dependencie…
CachingMixin
2
▼
Mixin for compiling cache and filter-block statements.
Host attributes and cross-mixin dependencies are declared via inline TYPE_CHECKING blocks.
Methods
Internal Methods 2 ▼
_compile_cache
1
list[ast.stmt]
▼
Compile {% cache key %}...{% endcache %.
Fragment caching. In streaming mode: …
_compile_cache
1
list[ast.stmt]
▼
def _compile_cache(self, node: Cache) -> list[ast.stmt]
Compile {% cache key %}...{% endcache %.
Fragment caching. In streaming mode: collect into buffer, cache, then yield. Body always uses StringBuilder mode for caching.
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
Returns
list[ast.stmt]
_compile_filter_block
1
list[ast.stmt]
▼
Compile {% filter name %}...{% endfilter %.
Apply a filter to an entire block …
_compile_filter_block
1
list[ast.stmt]
▼
def _compile_filter_block(self, node: FilterBlock) -> list[ast.stmt]
Compile {% filter name %}...{% endfilter %.
Apply a filter to an entire block of content. In streaming mode: collect into buffer, apply filter, yield result.
Parameters
| Name | Type | Description |
|---|---|---|
node |
— |
Returns
list[ast.stmt]