From 8e0674d8fd5cd0631ff959fa81f01cd500a74893 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Mon, 31 Dec 2012 16:02:49 +0100 Subject: [PATCH] Simplify code. Doc's mention about expiration time is precisely that server's code is supposed to do just that internally. --- product/ERP5Type/Tool/MemcachedTool.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/product/ERP5Type/Tool/MemcachedTool.py b/product/ERP5Type/Tool/MemcachedTool.py index a6aaca59bf..48be64f855 100644 --- a/product/ERP5Type/Tool/MemcachedTool.py +++ b/product/ERP5Type/Tool/MemcachedTool.py @@ -27,7 +27,6 @@ # ############################################################################## -import time from threading import local from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type import Permissions, _dtmldir @@ -96,8 +95,6 @@ if memcache is not None: self.local_cache = {} self.scheduled_action_dict = {} self.server_list = server_list - # see "Expiration times" from memcached protocol docs - self.expiration_time_since_epoch = expiration_time > (60*60*24*30) self.expiration_time = expiration_time self.server_max_key_length = server_max_key_length self.server_max_value_length = server_max_value_length @@ -130,8 +127,6 @@ if memcache is not None: """ try: expiration_time = self.expiration_time - if self.expiration_time_since_epoch: - expiration_time += time.time() for key, value in self.local_cache.iteritems(): if getattr(value, MEMCACHED_TOOL_MODIFIED_FLAG_PROPERTY_ID, None): delattr(value, MEMCACHED_TOOL_MODIFIED_FLAG_PROPERTY_ID) -- 2.30.9