Python-memcached docstring for set() says this:

"""
@param time: Tells memcached the time which this value should expire,
either
as a delta number of seconds, or an absolute unix time-since-the-epoch
value. See the memcached protocol docs section "Storage Commands"
for more info on <exptime>. We default to 0 == cache forever.
"""

So it says, zero means forever. But django wrapper class for memcache
has this line in set():

timeout = timeout or self.default_timeout

Which means that it will never accept zero as a value unless I specify
a default timeout of zero in settings (which I don't want to do,
because I want to have the default value other than 'forever'), I only
need infinite timeout in few cases.

Either python-memcached docstring is wrong (i.e. setting time to zero
doesnt mean "forever") or django doesnt implement it 100% correctly.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to