'Memcached deals with long (> 30 days) timeouts in a special
way. Call this function to obtain a safe value for your timeout.'

def _get_memcache_timeout(self, timeout):

    timeout = (timeout or self.default_timeout)
    if (timeout > 2592000):
        timeout += int(time.time())
    return int(timeout)
