Commit 05e4a3a6 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Always create a new object when not cached or expired.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2853 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1d61528c
......@@ -126,8 +126,7 @@ class CachingMethod:
obj = CachingMethod.cached_object_dict.get(index)
if obj is None or obj.time + obj.duration < now:
#LOG('CachingMethod', 0, 'cache miss: id = %s, duration = %s, method = %s, args = %s, kwd = %s' % (str(self.id), str(self.duration), str(self.method), str(args), str(kwd)))
if obj is None:
obj = CachedObject()
obj = CachedObject()
obj.time = now
obj.duration = self.duration
obj.result = self.method(*args, **kwd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment