From 6fc7158a06adaca595a9a21e853d2e2841ba5c52 Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Wed, 19 Nov 2008 13:05:38 +0000
Subject: [PATCH] Do not set high debug level to memcached plugin (this will
 print on stdout). Fix imports.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24633 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/CachePlugins/DistributedRamCache.py | 8 +-------
 product/ERP5Type/CachePlugins/RamCache.py            | 4 +---
 product/ERP5Type/CachePlugins/SQLCache.py            | 6 +-----
 3 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/product/ERP5Type/CachePlugins/DistributedRamCache.py b/product/ERP5Type/CachePlugins/DistributedRamCache.py
index 24d9661699..22ef450c25 100644
--- a/product/ERP5Type/CachePlugins/DistributedRamCache.py
+++ b/product/ERP5Type/CachePlugins/DistributedRamCache.py
@@ -29,12 +29,8 @@
 """
 Memcached based cache plugin.
 """
-
-from time import time
 from thread import get_ident
-
 from zLOG import LOG
-
 from BaseCache import BaseCache
 from BaseCache import CacheEntry
 
@@ -52,8 +48,7 @@ class DistributedRamCache(BaseCache):
 
   def __init__(self, params):
     self._servers = params.get('server', '')
-    self._debugLevel = params.get('debugLevel', 7)
-    self._last_cache_conn_creation_time = time()
+    self._debugLevel = params.get('debugLevel', 0)
     BaseCache.__init__(self)
     
   def initCacheStorage(self):
@@ -78,7 +73,6 @@ class DistributedRamCache(BaseCache):
     else:
       ## we have memcache_conn for this thread
       return memcache_conn
-
        
   def checkAndFixCacheId(self, cache_id, scope):
     ## memcached doesn't support namespaces (cache scopes) so to "emmulate"
diff --git a/product/ERP5Type/CachePlugins/RamCache.py b/product/ERP5Type/CachePlugins/RamCache.py
index 8accf8cdfc..32a6e09825 100644
--- a/product/ERP5Type/CachePlugins/RamCache.py
+++ b/product/ERP5Type/CachePlugins/RamCache.py
@@ -31,9 +31,7 @@ Local RAM based cache plugin.
 """
 
 import time
-
-from BaseCache import BaseCache
-from BaseCache import CacheEntry
+from BaseCache import BaseCache, CacheEntry
 
 def calcPythonObjectMemorySize(i):
   """ Recursive function that will 'walk' over complex python types and caclulate
diff --git a/product/ERP5Type/CachePlugins/SQLCache.py b/product/ERP5Type/CachePlugins/SQLCache.py
index 5f038fd1e8..b7723cae19 100644
--- a/product/ERP5Type/CachePlugins/SQLCache.py
+++ b/product/ERP5Type/CachePlugins/SQLCache.py
@@ -33,12 +33,8 @@ SQL (MySQL) based cache plugin.
 from thread import get_ident
 import time
 import base64
-
 from zLOG import LOG
-
-from BaseCache import BaseCache
-from BaseCache import CacheEntry
-from BaseCache import CachedMethodError
+from BaseCache import BaseCache, CacheEntry, CachedMethodError
 
 try:
   import cPickle as pickle
-- 
2.30.9