Commit 6fc7158a authored by Ivan Tyagov's avatar Ivan Tyagov

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
parent 8a861a9b
...@@ -29,12 +29,8 @@ ...@@ -29,12 +29,8 @@
""" """
Memcached based cache plugin. Memcached based cache plugin.
""" """
from time import time
from thread import get_ident from thread import get_ident
from zLOG import LOG from zLOG import LOG
from BaseCache import BaseCache from BaseCache import BaseCache
from BaseCache import CacheEntry from BaseCache import CacheEntry
...@@ -52,8 +48,7 @@ class DistributedRamCache(BaseCache): ...@@ -52,8 +48,7 @@ class DistributedRamCache(BaseCache):
def __init__(self, params): def __init__(self, params):
self._servers = params.get('server', '') self._servers = params.get('server', '')
self._debugLevel = params.get('debugLevel', 7) self._debugLevel = params.get('debugLevel', 0)
self._last_cache_conn_creation_time = time()
BaseCache.__init__(self) BaseCache.__init__(self)
def initCacheStorage(self): def initCacheStorage(self):
...@@ -79,7 +74,6 @@ class DistributedRamCache(BaseCache): ...@@ -79,7 +74,6 @@ class DistributedRamCache(BaseCache):
## we have memcache_conn for this thread ## we have memcache_conn for this thread
return memcache_conn return memcache_conn
def checkAndFixCacheId(self, cache_id, scope): def checkAndFixCacheId(self, cache_id, scope):
## memcached doesn't support namespaces (cache scopes) so to "emmulate" ## memcached doesn't support namespaces (cache scopes) so to "emmulate"
## such behaviour when constructing cache_id we add scope in front ## such behaviour when constructing cache_id we add scope in front
......
...@@ -31,9 +31,7 @@ Local RAM based cache plugin. ...@@ -31,9 +31,7 @@ Local RAM based cache plugin.
""" """
import time import time
from BaseCache import BaseCache, CacheEntry
from BaseCache import BaseCache
from BaseCache import CacheEntry
def calcPythonObjectMemorySize(i): def calcPythonObjectMemorySize(i):
""" Recursive function that will 'walk' over complex python types and caclulate """ Recursive function that will 'walk' over complex python types and caclulate
......
...@@ -33,12 +33,8 @@ SQL (MySQL) based cache plugin. ...@@ -33,12 +33,8 @@ SQL (MySQL) based cache plugin.
from thread import get_ident from thread import get_ident
import time import time
import base64 import base64
from zLOG import LOG from zLOG import LOG
from BaseCache import BaseCache, CacheEntry, CachedMethodError
from BaseCache import BaseCache
from BaseCache import CacheEntry
from BaseCache import CachedMethodError
try: try:
import cPickle as pickle import cPickle as pickle
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment