Answer the question
In order to leave comments, you need to log in
Exception from single block page caching in Django?
Tell me, pliz, what is the right thing to do in a situation where you need to block part of the page code for caching?
The problem now is that I cache the entire page through the decorator, where I call the rating form, and after reloading the page, the set rating is not displayed, as if it had not been set.
There is a feeling that the browser can cache more, but here, through the meta in the head block of the html template, you can disable caching again for the entire page.
I will be grateful for any solutions in this area.
Answer the question
In order to leave comments, you need to log in
If caching is done by a decorator, then it does not know anything about any pages and their parts, for it the cached data is just a string returned by the function. For partial caching, use the cache tag .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question