[Zope-Checkins] CVS: ZODB3/ZODB - Connection.py:1.98.6.6

Jeremy Hylton jeremy@zope.com
Mon, 7 Jul 2003 14:15:42 -0400


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv26493

Modified Files:
      Tag: zodb33-devel-branch
	Connection.py 
Log Message:
Repair _resetCache().


=== ZODB3/ZODB/Connection.py 1.98.6.5 => 1.98.6.6 ===
--- ZODB3/ZODB/Connection.py:1.98.6.5	Mon Jul  7 14:11:21 2003
+++ ZODB3/ZODB/Connection.py	Mon Jul  7 14:15:38 2003
@@ -226,14 +226,11 @@
         return self
 
     def _resetCache(self):
-        '''
-        Creates a new cache, discarding the old.
-        '''
+        """Creates a new cache, discarding the old."""
         self._code_timestamp = global_code_timestamp
         self._invalidated.clear()
-        orig_cache = self._cache
-        orig_cache.clear()
-        self._cache = cache = PickleCache(self, orig_cache.cache_size)
+        cache_size = self._cache.cache_size
+        self._cache = cache = PickleCache(self, cache_size)
         self._incrgc = self.cacheGC = cache.incrgc
 
     def abort(self, object, transaction):