From dc13a7081312d21741d42ea7a4622d2d0c2af92a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 27 Nov 2007 16:53:51 +0000
Subject: [PATCH] use .value instead of .getValue(), because this part have to
 be really fast

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17831 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Cache.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/product/ERP5Type/Cache.py b/product/ERP5Type/Cache.py
index 4ddb2e7eac..f45469c7af 100644
--- a/product/ERP5Type/Cache.py
+++ b/product/ERP5Type/Cache.py
@@ -85,26 +85,25 @@ class CacheFactory:
     """ When CacheFactory is called it will try to return cached value using
     appropriate cache plugin.
     """
-    cache_duration = self.cache_duration
-
     ## Expired Cache (if needed)
     self.expire()
 
     quick_cached = self.quick_cache.get(cache_id, scope)
     if quick_cached is not None:
-      return quick_cached.getValue()
+      return quick_cached.value
     else:
       ## not in local, check if it's in shared
       for shared_cache in self.shared_caches:
         if shared_cache.has_key(cache_id, scope):
           cache_entry = shared_cache.get(cache_id, scope)
-          value = cache_entry.getValue()
+          value = cache_entry.value
           ## update local cache
           self.quick_cache.set(cache_id, scope, value,
                               cache_entry.cache_duration,
                               cache_entry.calculation_time)
           return value
 
+    cache_duration = self.cache_duration
     ## not in any available cache plugins calculate and set to local ..
     start = time()
     value = callable_object(*args, **kwd)
-- 
2.30.9