If you have a {% cache %} tag and inside this any tags insert new variables into the context, they should be cached along with the rendered result and inserted in the future.
{% cache key exp %}
{% get_related_posts as related_posts %}
{% endcache %}
{% for post in related_posts %}
....
{% endfor %}
If you have a {% cache %} tag and inside this any tags insert new variables into the context, they should be cached along with the rendered result and inserted in the future.