[Erp5-report] r42822 nicolas.dumazet - /erp5/trunk/products/ERP5Type/Cache.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 31 14:55:21 CET 2011
Author: nicolas.dumazet
Date: Mon Jan 31 14:55:21 2011
New Revision: 42822
URL: http://svn.erp5.org?rev=42822&view=rev
Log:
be more flexible when initializing the 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=42822&r1=42821&r2=42822&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Cache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Cache.py [utf8] Mon Jan 31 14:55:21 2011
@@ -51,10 +51,13 @@ def initializePortalCachingProperties(se
global is_cache_initialized
global is_cache_ready
if not is_cache_initialized:
+ portal_caches = getattr(self.getPortalObject(), 'portal_caches', None)
+ if portal_caches is None:
+ return
# we set is_cache_initialized right now to prevent infinite loops
is_cache_initialized = 1
## update cache structure from portal_caches
- self.getPortalObject().portal_caches.updateCache()
+ portal_caches.updateCache()
# we mark the cache as ready after initialization, because initialization
# itself will cause cache misses that we want to ignore
is_cache_ready = 1
More information about the Erp5-report
mailing list