Commit f1e333d4 authored by Sebastien Robin's avatar Sebastien Robin

Cache was almost not working because the global variable was not used

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11077 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f205f423
......@@ -180,7 +180,9 @@ class CachingMethod:
try:
## try to get value from cache in a try block
## which is faster than checking for keys
value = self.factories[self.cache_factory](self.callable_object,
# It is very important to take the factories dictionnary
# on CachingMethod instead of self, we want a global variable
value = CachingMethod.factories[self.cache_factory](self.callable_object,
cache_id,
scope,
self.cache_duration,
......
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