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 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
and memcached
backend when a timeout of 0
is provided.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With