This is low priority for me, but would be cool to know the answer to.
In the docs (v0.102) for the template caching, we state that:
"As the same component is often used many times on the same page, these savings add up."
However, Django docs (v5.1) for the Template class say that:
The system only parses your raw template code once – when you create the Template object. From then on, it’s stored internally as a tree structure for performance.
So from the wording it seems that Django already caches the Template objects automatically.
There's still value to caching on our end, because we have to post-process those templates, e.g. extract the {% slot %} and {% fill %} tags, and we cache those results.
But it'd be great to have a clear picture of how Django's template caching works exactly. And to know what impact our caching has.
This is low priority for me, but would be cool to know the answer to.
In the docs (v0.102) for the template caching, we state that:
However, Django docs (v5.1) for the
Template
class say that:So from the wording it seems that Django already caches the
Template
objects automatically.There's still value to caching on our end, because we have to post-process those templates, e.g. extract the
{% slot %}
and{% fill %}
tags, and we cache those results.But it'd be great to have a clear picture of how Django's template caching works exactly. And to know what impact our caching has.