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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Oct 15 17:07:44 CEST 2009


Author: kazuhiko
Date: Thu Oct 15 17:07:41 2009
New Revision: 29684

URL: http://svn.erp5.org?rev=29684&view=rev
Log:
default value for 'id' and 'cache_factory' should be taken form CachingMethod instance itself.

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=29684&r1=29683&r2=29684&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Cache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Cache.py [utf8] Thu Oct 15 17:07:41 2009
@@ -205,8 +205,12 @@
               *args, **kwd)
     return value
 
-  def delete(self, id, cache_factory=DEFAULT_CACHE_FACTORY, scope=DEFAULT_CACHE_SCOPE):
+  def delete(self, id=None, cache_factory=None, scope=DEFAULT_CACHE_SCOPE):
     """ Delete cache key. """
+    if id is None:
+      id = self.id
+    if cache_factory is None:
+      cache_factory = self.cache_factory
     cache_id = self.generateCacheId(id)
     cache_factory = CachingMethod.factories[cache_factory]
     for cp in cache_factory.getCachePluginList():




More information about the Erp5-report mailing list