[Zodb-checkins] CVS: ZODB4/Persistence - Cache.py:1.4

Jeremy Hylton jeremy@zope.com
Fri, 15 Nov 2002 16:49:43 -0500


Update of /cvs-repository/ZODB4/Persistence
In directory cvs.zope.org:/tmp/cvs-serv1060/Persistence

Modified Files:
	Cache.py 
Log Message:
Some more database simplifications

Get rid of version-specific pools.  If an application is using
version, we're just going to let it get mixed in with other pools.
When connection is reset, it clears its cache when the new version is
different than the old version.

Get rid of modifiedInVersion() cache.  There are no calls to
modifiedInVersion() outside of the ZODB test suite, so it can't be
that important to optimize it.

Add saveObject() method to Pickler and use it to create pickle for the
database root.   XXX The Connection should use this code (or something
like it) to save objects, too.


=== ZODB4/Persistence/Cache.py 1.3 => 1.4 ===
--- ZODB4/Persistence/Cache.py:1.3	Wed Jul 24 18:51:58 2002
+++ ZODB4/Persistence/Cache.py	Fri Nov 15 16:49:42 2002
@@ -189,6 +189,10 @@
         for oid in oids:
             self.invalidate(oid)
 
+    def clear(self):
+        for oid in self.__active.keys():
+            self.invalidate(oid)
+
     def statistics(self):
         return {
             'ghosts': len(self.__ghosts),