[Erp5-report] r11127 - /erp5/trunk/products/ERP5Type/Cache.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Nov 6 16:10:59 CET 2006


Author: jerome
Date: Mon Nov  6 16:10:57 2006
New Revision: 11127

URL: http://svn.erp5.org?rev=11127&view=rev
Log:
method_id= is not supported in clearCache, use context.portal_caches.clearCacheFactory if you need to flush a given cache.


Modified:
    erp5/trunk/products/ERP5Type/Cache.py

Modified: erp5/trunk/products/ERP5Type/Cache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Cache.py?rev=11127&r1=11126&r2=11127&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Cache.py (original)
+++ erp5/trunk/products/ERP5Type/Cache.py Mon Nov  6 16:10:57 2006
@@ -241,20 +241,9 @@
 ## TODO: Check if it make sense to keep them any more ##
 ########################################################
 
-def clearCache(method_id = None, scope = DEFAULT_CACHE_SCOPE):
-  """
-  Clear the cache.
-  If method_id is specified, it clears the cache only for this method,
-  otherwise, it clears the whole cache. Make sure to specify scope otherwise
-  default one will be used.
-  """
-  if method_id is not None:
-    ## clear cache factories and plugins for specified method_id
-    for cf_id, cf_obj in CachingMethod.factories.items():
-      for cp in cf_obj.getCachePluginList():
-        cp.delete(method_id, scope)
-  else:
-    ## clear (flush) whole cache
-    for cf_obj in CachingMethod.factories.values():
-      for cp in cf_obj.getCachePluginList():
-        cp.clearCache()
+def clearCache():
+  """Clear the whole cache. """
+  for cf_obj in CachingMethod.factories.values():
+    for cp in cf_obj.getCachePluginList():
+      cp.clearCache()
+




More information about the Erp5-report mailing list