[Zodb-checkins] CVS: Packages/ZEO - ClientCache.py:1.14.4.2
jeremy@digicool.com
jeremy@digicool.com
Wed, 18 Apr 2001 16:52:33 -0400 (EDT)
Update of /cvs-repository/Packages/ZEO
In directory korak:/tmp/cvs-serv8305
Modified Files:
Tag: ZEO-ZRPC-Dev
ClientCache.py
Log Message:
Revise cache to use new validation protocol.
Add local log() helper function.
--- Updated File ClientCache.py in package Packages/ZEO --
--- ClientCache.py 2001/03/29 21:31:57 1.14.4.1
+++ ClientCache.py 2001/04/18 20:52:33 1.14.4.2
@@ -150,6 +150,12 @@
from struct import pack, unpack
from thread import allocate_lock
+import sys
+import zLOG
+
+def log(msg, level=zLOG.INFO):
+ zLOG.LOG("ZEC", level, msg)
+
magic='ZEC0'
class ClientCache:
@@ -207,6 +213,8 @@
f[0].write(magic)
current=0
+ log("cache opened. current = %s" % current)
+
self._limit=size/2
self._current=current
@@ -232,6 +240,8 @@
verifyFunc(oid, serialno, version)
"""
+ for oid, (s, vs) in self.open():
+ verifyFunc(oid, s, vs)
def invalidate(self, oid, version):
self._acquire()