[Fixed]-Cache Django view until table in database is updated

1👍

That’s how it works. In order to invalidate the cache you could use a signal to clear certain cache entry when certain model instance is saved.

https://docs.djangoproject.com/en/1.8/topics/signals/

As for setting an infinite cache, use None as timeout and it will never expire (Django 1.7+).

Leave a comment