[Zope-CVS] CVS: Products/FileCacheManager - FileCacheManager.py:1.19

Chris McDonough chrism at plope.com
Sun Aug 29 20:39:19 EDT 2004


Update of /cvs-repository/Products/FileCacheManager
In directory cvs.zope.org:/tmp/cvs-serv22887

Modified Files:
	FileCacheManager.py 
Log Message:
Dont allow the selection of RAMCacheManager-only properties.


=== Products/FileCacheManager/FileCacheManager.py 1.18 => 1.19 ===
--- Products/FileCacheManager/FileCacheManager.py:1.18	Sun Aug 29 16:52:23 2004
+++ Products/FileCacheManager/FileCacheManager.py	Sun Aug 29 20:38:49 2004
@@ -44,6 +44,7 @@
     _tempfile_path = ''
 
     manage_stats = PageTemplateFile('www/statsFCM', globals())
+    manage_main = PageTemplateFile('www/propsFCM', globals())
 
     def __init__(self, ob_id, path='/tmp', tpath='', title=''):
         # based on RAMCacheManager
@@ -62,11 +63,20 @@
 
     def getCacheReport(self):
         """
-        Reports on the contents of the cache.
+        Reports on the contents of the cache (used by Statistics tab).
         """
         cache = self.ZCacheManager_getCache()
         return cache.values()
     
+    def manage_editProps(self, title, settings=None, REQUEST=None):
+        'Changes the cache settings.'
+        if settings is None:
+            settings = REQUEST
+        self.title = str(title)
+        if REQUEST is not None:
+            return self.manage_main(
+                self, REQUEST, manage_tabs_message='Properties changed.')
+
     def ZCacheManager_getCache(self):
         """ Cache Settings """
         cacheid = self.__cacheid



More information about the Zope-CVS mailing list