X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/194615a88fac0c4259b3c2217c8e13372b7c3b86..bcbd5801c2be23b2ee1a22e7b088fc2fb654f1c9:/lib/python/Components/Element.py diff --git a/lib/python/Components/Element.py b/lib/python/Components/Element.py index 437d934b..2af57793 100644 --- a/lib/python/Components/Element.py +++ b/lib/python/Components/Element.py @@ -8,11 +8,12 @@ from Tools.CList import CList def cached(f): name = f.__name__ def wrapper(self): - if self.cache is None: + cache = self.cache + if cache is None: return f(self) - if name not in self.cache: - self.cache[name] = (True, f(self)) - return self.cache[name][1] + if name not in cache: + cache[name] = (True, f(self)) + return cache[name][1] return wrapper class Element(object):