From d12cae211b98e990b441d78f4059d1806fd825c6 Mon Sep 17 00:00:00 2001 From: Julien Muchembled <jm@nexedi.com> Date: Thu, 14 Oct 2010 13:45:56 +0000 Subject: [PATCH] small optimization git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39159 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ZSQLCatalog/SQLCatalog.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py index 392e5feec9..f7ff3c43fb 100644 --- a/product/ZSQLCatalog/SQLCatalog.py +++ b/product/ZSQLCatalog/SQLCatalog.py @@ -101,14 +101,13 @@ except ImportError: def getTransactionalVariable(): return {} -def generateCatalogCacheId(method_id, *args, **kwd): - self = args[0] +def generateCatalogCacheId(method_id, self, *args, **kwd): # XXX: getPath is overkill for a unique cache identifier. # What I would like to use instead of it is: # (self._p_jar.db().database_name, self._p_oid) # but database_name is not unique in at least ZODB 3.4 (Zope 2.8.8). return str((method_id, self.getCacheSequenceNumber(), self.getPath(), - args[1:], kwd)) + args, kwd)) class transactional_cache_decorator: """ -- 2.30.9