Commit 08834c02 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix commit r39141, due to hasty rework before commit.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39171 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 356aa88f
...@@ -101,12 +101,15 @@ except ImportError: ...@@ -101,12 +101,15 @@ except ImportError:
def getTransactionalVariable(): def getTransactionalVariable():
return {} return {}
def generateCatalogCacheId(method_id, self, *args, **kwd): def getInstanceID(instance):
# XXX: getPath is overkill for a unique cache identifier. # XXX: getPhysicalPath is overkill for a unique cache identifier.
# What I would like to use instead of it is: # What I would like to use instead of it is:
# (self._p_jar.db().database_name, self._p_oid) # (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). # but database_name is not unique in at least ZODB 3.4 (Zope 2.8.8).
return str((method_id, self.getCacheSequenceNumber(), self.getPath(), return instance.getPhysicalPath()
def generateCatalogCacheId(method_id, self, *args, **kwd):
return str((method_id, self.getCacheSequenceNumber(), getInstanceID(self),
args, kwd)) args, kwd))
class transactional_cache_decorator: class transactional_cache_decorator:
......
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