[Erp5-report] r11021 - in /erp5/trunk/products/ERP5Cache: CacheTool.py __init__.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Oct 31 15:36:46 CET 2006
Author: seb
Date: Tue Oct 31 15:36:44 2006
New Revision: 11021
URL: http://svn.erp5.org?rev=11021&view=rev
Log:
removed the cache per site feature
Modified:
erp5/trunk/products/ERP5Cache/CacheTool.py
erp5/trunk/products/ERP5Cache/__init__.py
Modified: erp5/trunk/products/ERP5Cache/CacheTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Cache/CacheTool.py?rev=11021&r1=11020&r2=11021&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Cache/CacheTool.py (original)
+++ erp5/trunk/products/ERP5Cache/CacheTool.py Tue Oct 31 15:36:44 2006
@@ -140,21 +140,20 @@
security.declareProtected(Permissions.AccessContentsInformation, 'getRamCacheRoot')
def getRamCacheRoot(self):
""" Return RAM based cache root """
- erp5_site_id = self.getPortalObject().getId()
- return CachingMethod.factories[erp5_site_id]
+ return CachingMethod.factories
security.declareProtected(Permissions.ModifyPortalContent, 'updateCache')
def updateCache(self, REQUEST=None):
""" Clear and update cache structure """
- erp5_site_id = self.getPortalObject().getId()
- for cf in CachingMethod.factories[erp5_site_id]:
- for cp in CachingMethod.factories[erp5_site_id][cf].getCachePluginList():
+ #erp5_site_id = self.getPortalObject().getId()
+ for cf in CachingMethod.factories:
+ for cp in CachingMethod.factories[cf].getCachePluginList():
del cp
- CachingMethod.factories[erp5_site_id] = {}
+ CachingMethod.factories = {}
## read configuration from ZODB
for key,item in self.getCacheFactoryList().items():
if len(item['cache_plugins'])!=0:
- CachingMethod.factories[erp5_site_id][key] = CacheFactory(item['cache_plugins'], item['cache_params'])
+ CachingMethod.factories[key] = CacheFactory(item['cache_plugins'], item['cache_params'])
if REQUEST:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?portal_status_message=Cache updated.')
Modified: erp5/trunk/products/ERP5Cache/__init__.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Cache/__init__.py?rev=11021&r1=11020&r2=11021&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Cache/__init__.py (original)
+++ erp5/trunk/products/ERP5Cache/__init__.py Tue Oct 31 15:36:44 2006
@@ -6,16 +6,17 @@
product_path = package_home( globals() )
this_module._dtmldir = os.path.join( product_path, 'dtml' )
from Products.ERP5Type.Utils import initializeProduct, updateGlobals
+
import CacheTool
-#import CacheTool
-
object_classes = ()
-portal_tools = () #(CacheTool.CacheTool,)
+portal_tools = ()
content_classes = ()
content_constructors = ()
document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions)
portal_tools = ( CacheTool.CacheTool, )
+
+
def initialize( context ):
@@ -27,3 +28,4 @@
portal_tools = portal_tools,
content_constructors = content_constructors,
content_classes = content_classes)
+
More information about the Erp5-report
mailing list