From b74b94445de4173351b8c347deac22129c549f0f Mon Sep 17 00:00:00 2001 From: Karol Duleba Date: Mon, 6 Jul 2015 14:48:06 +0100 Subject: [PATCH] Updated Memcached get_backend_timeout() comment. --- django/core/cache/backends/memcached.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py index fdd12a1e166..40f13183d47 100644 --- a/django/core/cache/backends/memcached.py +++ b/django/core/cache/backends/memcached.py @@ -53,10 +53,11 @@ class BaseMemcachedCache(BaseCache): timeout = -1 if timeout > 2592000: # 60*60*24*30, 30 days - # See http://code.google.com/p/memcached/wiki/FAQ - # "You can set expire times up to 30 days in the future. After that - # memcached interprets it as a date, and will expire the item after - # said date. This is a simple (but obscure) mechanic." + # See http://code.google.com/p/memcached/wiki/NewProgramming#Expiration + # "Expiration times can be set from 0, meaning "never expire", to + # 30 days. Any time higher than 30 days is interpreted as a Unix + # timestamp date. If you want to expire an object on January 1st of + # next year, this is how you do that." # # This means that we have to switch to absolute timestamps. timeout += int(time.time())