[Zodb-checkins] CVS: ZODB3/ZEO - cache.py:1.1.2.5
Jeremy Hylton
cvs-admin at zope.org
Wed Nov 12 17:21:13 EST 2003
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv2916/ZEO
Modified Files:
Tag: ZODB3-mvcc-2-branch
cache.py
Log Message:
Change cache's load() to work like storage's loadEx().
=== ZODB3/ZEO/cache.py 1.1.2.4 => 1.1.2.5 ===
--- ZODB3/ZEO/cache.py:1.1.2.4 Tue Nov 11 16:45:49 2003
+++ ZODB3/ZEO/cache.py Wed Nov 12 17:20:37 2003
@@ -101,7 +101,7 @@
self.dll = Cache(size or 10**6)
def open(self):
- if os.path.exists(self.path):
+ if self.path and os.path.exists(self.path):
self._read()
def _read(self):
@@ -164,9 +164,9 @@
# Return the current data record for oid and version.
# @param oid object id
# @param version a version string
- # @return data record and serial number or None if the object is not
+ # @return data record, serial number, tid or None if the object is not
# in the cache
- # @defreturn 2-tuple: (string, string)
+ # @defreturn 3-tuple: (string, string, string)
def load(self, oid, version=""):
tid = version and self.version.get(oid) or self.current.get(oid)
@@ -175,7 +175,7 @@
o = self.dll.access((oid, tid))
if o is None:
return None
- return o.data, o.serialno
+ return o.data, o.serialno, tid
##
# Return a non-current revision of oid that was current before tid.
More information about the Zodb-checkins
mailing list