Fix invalid treatment of timeout=0 #1

Closed
robhudson opened this Issue Sep 14, 2012 · 1 comment

Projects

None yet

2 participants

@robhudson
Mozilla member

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?

@tarekziade
Mozilla member

Sorry for the late answer - I just noticed your message

Sure we could do this - will work on a patch

@tarekziade tarekziade closed this in 00737a7 Oct 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment