mozilla/django-memcached-pool

Fix invalid treatment of timeout=0

Closed this issue · 1 comments

Django's memcache backend treats a timeout=0 as invalid and falls back to using a default timeout value:
https://github.com/django/django/blob/master/django/core/cache/backends/memcached.py#L43

We previously used the django-cache-machine backend which fixes this:
https://github.com/jbalogh/django-cache-machine/blob/master/caching/backends/memcached.py#L9

Could we do something similar in this backend, so timeout=0 are treated as infinite?

Sorry for the late answer - I just noticed your message

Sure we could do this - will work on a patch