ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zope-checkins
zope-checkins
[Zope-Checkins] SVN: Zope/branches/2.12/ Include bytes limited cache size in the cache parameters ZMI screen
by Hanno Schlichting other posts by this author
Nov 7 2009 5:06PM messages near this date
[Zope-Checkins] SVN: Zope/trunk/src/App/ Merged c105511 from 2.12 branch | [Zope-Checkins] SVN: Zope/branches/2.12/ Avoid possible errors on test tear-down in Products.Five.fiveconfigure's cleanUp() function if Products.meta_types has not been set
Log message for revision 105511:
  Include bytes limited cache size in the cache parameters ZMI screen
  

Changed:
  U   Zope/branches/2.12/doc/CHANGES.rst
  U   Zope/branches/2.12/src/App/CacheManager.py
  U   Zope/branches/2.12/src/App/dtml/cacheParameters.dtml

-=-
Modified: Zope/branches/2.12/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.12/doc/CHANGES.rst	2009-11-06 22:33:23 UTC (rev 105510)
+++ Zope/branches/2.12/doc/CHANGES.rst	2009-11-08 01:06:06 UTC (rev 105511)
@@ -8,6 +8,11 @@
 Zope 2.12.2 (unreleased)
 ------------------------
 
+Features Added
+++++++++++++++
+
+- Include bytes limited cache size in the cache parameters ZMI screen.
+
 Bugs Fixed
 ++++++++++
 
@@ -17,8 +22,8 @@
 Zope 2.12.1 (2009/11/02)
 ------------------------
 
-Bugs Fixed
-++++++++++
+Features Added
+++++++++++++++
 
 - Updated packages:
 
@@ -35,6 +40,9 @@
 - Refactored Windows Service support to not need or use zopeservice.py
   in instances. This makes buildout-based instances work on Windows.
 
+Bugs Fixed
+++++++++++
+
 - LP #440490: zopectl fg|adduser|run|debug now work on Windows.
 
 - LP #443005: zopectl stop works once more on Windows.

Modified: Zope/branches/2.12/src/App/CacheManager.py
===================================================================
--- Zope/branches/2.12/src/App/CacheManager.py	2009-11-06 22:33:23 UTC (rev 105510)
+++ Zope/branches/2.12/src/App/CacheManager.py	2009-11-08 01:06:06 UTC (rev 105511)
@@ -17,8 +17,6 @@
 $Id$'''
 __version__='$Revision: 1.31 $'[11:-2]
 
-import time
-
 from App.class_init import InitializeClass
 from App.special_dtml import DTMLFile
 from App.ImageFile import ImageFile
@@ -44,6 +42,9 @@
     def cache_length(self):
         return self._getDB().cacheSize()
 
+    def cache_length_bytes(self):
+        return self._getDB().getCacheSizeBytes()
+
     def cache_detail_length(self):
         return self._getDB().cacheDetailSize()
 
@@ -76,28 +77,6 @@
             response=REQUEST['RESPONSE']
             response.redirect(REQUEST['URL1']+'/manage_cacheParameters')
 
-
-    # BoboPOS 2
-    def cache_mean_age(self):
-        import Globals  # for data
-        return Globals.Bobobase._jar.cache.cache_mean_age/60.0
-
-    # BoboPOS 2
-    def cache_mean_deal(self):
-        import Globals  # for data
-        return Globals.Bobobase._jar.cache.cache_mean_deal*60
-
-    # BoboPOS 2
-    def cache_mean_deac(self):
-        import Globals  # for data
-        return Globals.Bobobase._jar.cache.cache_mean_deac*60
-
-    # BoboPOS 2
-    def cache_last_gc_time(self):
-        import Globals  # for data
-        t = Globals.Bobobase._jar.cache.cache_last_gc_time
-        return time.asctime(time.localtime(t))
-
     def manage_full_sweep(self,value,REQUEST):
         "Perform a full sweep through the cache"
         db = self._getDB()

Modified: Zope/branches/2.12/src/App/dtml/cacheParameters.dtml
===================================================================
--- Zope/branches/2.12/src/App/dtml/cacheParameters.dtml	2009-11-06 22:33:23 UTC (rev 105510
)
+++ Zope/branches/2.12/src/App/dtml/cacheParameters.dtml	2009-11-08 01:06:06 UTC (rev 105511
)
@@ -42,6 +42,19 @@
 </tr> 
 
 <tr> 
+  <td align="left"> 
+  <div class="form-label"> 
+  Target memory size per cache in bytes
+  </div> 
+  </td> 
+  <td> 
+  <div class="form-text"> 
+  &dtml-cache_length_bytes;
+  </div> 
+  </td> 
+</tr> 
+
+<tr> 
   <td align="left" colspan=2> 
   <div class="form-label"> 
   Total number of objects in each cache:

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@[...].org
https://mail.zope.org/mailman/listinfo/zope-checkins

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved