[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/cache/ram.py Fixed an error in getStatistics of the RAM cache.

Jürgen Kartnaller juergen at kartnaller.at
Tue Jan 30 10:11:43 EST 2007


Log message for revision 72261:
  Fixed an error in getStatistics of the RAM cache.
  
  If a cache entry never had a miss it has no entry in the _misses mapping.
  

Changed:
  U   Zope3/trunk/src/zope/app/cache/ram.py

-=-
Modified: Zope3/trunk/src/zope/app/cache/ram.py
===================================================================
--- Zope3/trunk/src/zope/app/cache/ram.py	2007-01-30 13:04:53 UTC (rev 72260)
+++ Zope3/trunk/src/zope/app/cache/ram.py	2007-01-30 15:11:42 UTC (rev 72261)
@@ -338,7 +338,7 @@
             hits = sum(entry[2] for entry in self._data[ob].itervalues())
             result.append({'path': ob,
                            'hits': hits,
-                           'misses': self._misses[ob],
+                           'misses': self._misses.get(ob, 0),
                            'size': size,
                            'entries': len(self._data[ob])})
         return tuple(result)



More information about the Zope3-Checkins mailing list