we have a parent template, which defines some blocks such as {% block title%} and {% block content %}
then we have several child templates, which extend the parent and implement the defined blocks
within the child templates we would like to wrap ALL the implemented blocks into ONE single cache block
sadly, the caching doesn't seem to work: when we change any contents wrapped by the cache block, the changes are immediately visible on the page. on the other hand, when we place one cache block in each of the implemented blocks, caching DOES work.
WORKS:::
{% extends "base.html" %}
{% block title %}
{% cache 'title' 3000 %}
My title
{% endcache %}
{% endblock %}
{% block content %}
{% cache 'content' 3000 %}
A lot of content
{% endcache %}
{% endblock %}
...
DOESN'T WORK:::
{% extends "base.html" %}
{% cache 'allBlocks' 3000 %}
{% block title %}
My title
{% endblock %}
{% block content %}
A lot of content
{% endblock %}
{% endcache %}
...
WORKS:::
DOESN'T WORK:::
what are we doing wrong?