diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py index 8bd582f66705f1dddb0d8d53c636293657667136..40d5a1c38429576a7b93dd35f5d35f627996dcca 100644 --- a/product/ZSQLCatalog/SQLCatalog.py +++ b/product/ZSQLCatalog/SQLCatalog.py @@ -112,11 +112,12 @@ class transactional_cache_decorator: def __call__(self, method): def wrapper(wrapped_self): transactional_cache = getTransactionalVariable(None) + cache_id = self.cache_id try: - return transactional_cache[self.cache_id] + result = transactional_cache[cache_id] except KeyError: - result = transactional_cache[self.cache_id] = method(wrapped_self) - return result + result = transactional_cache[cache_id] = method(wrapped_self) + return result return wrapper try: