Here is the problem: I have blog app and I cache the post output view for 5 minutes.
@cache_page(60 * 5)
def article(request, slug):
...
However, I'd like to invalidate the cache whenever a new comment is added to the post. I'm wondering how best to do so?
I've seen this related question, but it is outdated.
I would cache in a bit different way:
then saving the new comment to this article object: