[Erp5-report] r29676 - /erp5/trunk/products/ERP5Type/Cache.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 15 14:42:58 CEST 2009
Author: yo
Date: Thu Oct 15 14:42:57 2009
New Revision: 29676
URL: http://svn.erp5.org?rev=29676&view=rev
Log:
Optimize the cache retrieval when a quick cache is available.
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=29676&r1=29675&r2=29676&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Cache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Cache.py [utf8] Thu Oct 15 14:42:57 2009
@@ -68,6 +68,7 @@
## separete local and shared cache plugins
self.quick_cache = self.cache_plugins[0]
+ self._quick_cache_get = self.quick_cache.get
try:
self.shared_caches = self.cache_plugins[1:]
except IndexError:
@@ -92,8 +93,7 @@
self.expire(now)
try:
- quick_cached = self.quick_cache.get(cache_id, scope)
- return quick_cached.getValue()
+ return self._quick_cache_get(cache_id, scope).getValue()
except KeyError:
## not in local, check if it's in shared
for shared_cache in self.shared_caches:
More information about the Erp5-report
mailing list