I was trying to set up cache for my Django application but it seems that Django's caching framework is based on TIMEOUT
: set a cache and it'll remain valid for the TIMEOUT
amount of seconds.
That seems pretty useless for most situations. Most webpages would have some user contributed contents such as comments or votes or forum posts. A timeout cache mechanism wouldn't work there. What is needed would be some way to invalidate caches: when a user submits a comment or a vote, the cache for that page needs to be invalidated.
Is there any way to do that in Django? If not, how do you cache pages generated by your Django application?
Thanks.