Is there a way I can set a cache key indefinitely using the default django cache framework? I tried setting the timeout to 0, but that doesn't set the key at all unfortunately.
Django - Persistant cache
2.9k views Asked by Hanpan At
2
There are 2 answers
0
On
Django 1.6 now accepts None for the timeout argument to specify forever.
https://docs.djangoproject.com/en/dev/topics/cache/#basic-usage
Someone recently mentioned Johnny Cache in an unrelated answer. It provides a infinite caching
locmem
andmemcached
backend when a timeout of0
is provided.