[Zope-Checkins] SVN: Zope/trunk/lib/python/App/ Collector #1515:
2.8 failure: Cache statistics do not work
Tim Peters
tim.one at comcast.net
Thu Sep 30 11:08:17 EDT 2004
Log message for revision 27711:
Collector #1515: 2.8 failure: Cache statistics do not work
The DB.cacheStatistics() method was introduced in DB.py rev 1.2,
and has always returned an empty tuple. A number of "never did
anything, probably never will" DB methods like that were removed
in ZODB 3.3, to reduce stumbling over decoys. That was discussed
on zodb-dev at the time, with universal agreement to get rid of
them.
So the resolution in this case is changing Zope to stop trying
to access the no-longer-extant cacheStatistics() method. If
someone doesn't like this, they can revert this patch, then
change App/CacheManager.py's cacheStatistics() to return a
hard coded empty tuple <wink>.
Changed:
U Zope/trunk/lib/python/App/CacheManager.py
U Zope/trunk/lib/python/App/dtml/cacheGC.dtml
U Zope/trunk/lib/python/App/dtml/cacheParameters.dtml
-=-
Modified: Zope/trunk/lib/python/App/CacheManager.py
===================================================================
--- Zope/trunk/lib/python/App/CacheManager.py 2004-09-30 00:39:46 UTC (rev 27710)
+++ Zope/trunk/lib/python/App/CacheManager.py 2004-09-30 15:08:17 UTC (rev 27711)
@@ -92,9 +92,6 @@
response.redirect(REQUEST['URL1']+'/manage_cacheParameters')
- def cacheStatistics(self):
- return self._getDB().cacheStatistics()
-
# BoboPOS 2
def cache_mean_age(self):
return Globals.Bobobase._jar.cache.cache_mean_age/60.0
Modified: Zope/trunk/lib/python/App/dtml/cacheGC.dtml
===================================================================
--- Zope/trunk/lib/python/App/dtml/cacheGC.dtml 2004-09-30 00:39:46 UTC (rev 27710)
+++ Zope/trunk/lib/python/App/dtml/cacheGC.dtml 2004-09-30 15:08:17 UTC (rev 27711)
@@ -27,19 +27,6 @@
</table>
-<dtml-if cacheStatistics>
-<h3>Cache Statistics</h3>
-<table>
-
-<dtml-in cacheStatistics>
-<tr><th align=left>&dtml-sequence-key;</th>
- <td>&dtml-sequence-item;</td>
-</tr>
-</dtml-in>
-
-</table>
-</dtml-if>
-
<dtml-if show_cache_detail>
<h4>Cache Details</h4><P>
Modified: Zope/trunk/lib/python/App/dtml/cacheParameters.dtml
===================================================================
--- Zope/trunk/lib/python/App/dtml/cacheParameters.dtml 2004-09-30 00:39:46 UTC (rev 27710)
+++ Zope/trunk/lib/python/App/dtml/cacheParameters.dtml 2004-09-30 15:08:17 UTC (rev 27711)
@@ -41,19 +41,7 @@
</td>
</tr>
-
-<dtml-in cacheStatistics>
<tr>
- <th align=left>
- &dtml-sequence-key;
- </th>
- <td>
- &dtml-sequence-item;
- </td>
-</tr>
-</dtml-in>
-
-<tr>
<td align="left" colspan=2>
<div class="form-label">
Total number of objects in each cache:
More information about the Zope-Checkins
mailing list