[Zodb-checkins] SVN: ZODB/branches/tseaver-python_picklecache/src/persistent/picklecache.py Bugfix in invalidate(); note need for forward port of DM's work.

Tres Seaver tseaver at palladion.com
Tue Mar 31 16:40:10 EDT 2009


Log message for revision 98733:
  Bugfix in invalidate();  note need for forward port of DM's work.

Changed:
  U   ZODB/branches/tseaver-python_picklecache/src/persistent/picklecache.py

-=-
Modified: ZODB/branches/tseaver-python_picklecache/src/persistent/picklecache.py
===================================================================
--- ZODB/branches/tseaver-python_picklecache/src/persistent/picklecache.py	2009-03-31 20:39:22 UTC (rev 98732)
+++ ZODB/branches/tseaver-python_picklecache/src/persistent/picklecache.py	2009-03-31 20:40:09 UTC (rev 98733)
@@ -31,7 +31,8 @@
 class PickleCache(object):
     implements(IPickleCache)
 
-    def __init__(self, jar, target_size):
+    def __init__(self, jar, target_size=0, cache_size_bytes=0):
+        # TODO:  forward-port Dieter's bytes stuff
         self.jar = jar
         self.target_size = target_size
         self.drain_resistance = 0
@@ -171,7 +172,7 @@
     def invalidate(self, to_invalidate):
         """ See IPickleCache.
         """
-        if isintance(to_invalidate, str):
+        if isinstance(to_invalidate, str):
             self._invalidate(to_invalidate)
         else:
             for oid in to_invalidate:



More information about the Zodb-checkins mailing list