From d37cfeccabacbba8f02798fc9bea3aa8d2f5a46d Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Wed, 16 Sep 2009 09:33:43 +0000 Subject: [PATCH] Disable clearCache, while memcached server does not support isolation of databases git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29063 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/CachePlugins/DistributedRamCache.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/CachePlugins/DistributedRamCache.py b/product/ERP5Type/CachePlugins/DistributedRamCache.py index e2e6806e2a..76fc79cc16 100644 --- a/product/ERP5Type/CachePlugins/DistributedRamCache.py +++ b/product/ERP5Type/CachePlugins/DistributedRamCache.py @@ -175,9 +175,12 @@ class DistributedRamCache(BaseCache): return [] def clearCache(self): + """This method is disabled because it clear unique storage shared by other + client. + Use expiration time instead. + """ BaseCache.clearCache(self) - cache_storage = self.getCacheStorage() - cache_storage.flush_all() + LOG('DistributedRamCache', WARNING, 'not allowed to clear memcache storage') def clearCacheForScope(self, scope): ## memcached doesn't support namespaces (cache scopes) neither getting cached key list. -- 2.30.9