[Erp5-report] r27031 - /erp5/trunk/products/ERP5Type/Core/CacheFactory.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon May 18 17:36:00 CEST 2009
Author: nicolas
Date: Mon May 18 17:35:59 2009
New Revision: 27031
URL: http://svn.erp5.org?rev=27031&view=rev
Log:
remove blank spaces
Modified:
erp5/trunk/products/ERP5Type/Core/CacheFactory.py
Modified: erp5/trunk/products/ERP5Type/Core/CacheFactory.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Core/CacheFactory.py?rev=27031&r1=27030&r2=27031&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Core/CacheFactory.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Core/CacheFactory.py [utf8] Mon May 18 17:35:59 2009
@@ -39,18 +39,18 @@
"""
CacheFactory is a collection of cache plugins. CacheFactory is an object which lives in ZODB.
"""
-
+
meta_type = 'ERP5 Cache Factory'
portal_type = 'Cache Factory'
isPortalContent = 1
isRADContent = 1
-
+
allowed_types = ('ERP5 Ram Cache',
'ERP5 Distributed Ram Cache',
'ERP5 SQL Cache',
'ERP5 Zodb Cache',
)
-
+
security = ClassSecurityInfo()
security.declareProtected(Permissions.ManagePortal,
'manage_editProperties',
@@ -63,26 +63,26 @@
, PropertySheet.Folder
, CacheFactory
)
-
-
+
+
def getCachePluginList(self):
""" get ordered list of installed cache plugins in ZODB """
cache_plugins = self.objectValues(self.allowed_types)
cache_plugins = map(None, cache_plugins)
cache_plugins.sort(key=lambda x: x.getIntIndex(0))
return cache_plugins
-
+
security.declareProtected(Permissions.AccessContentsInformation, 'getRamCacheFactory')
def getRamCacheFactory(self):
""" Return RAM based cache factory """
erp5_site_id = self.getPortalObject().getId()
return CachingMethod.factories[erp5_site_id][self.cache_scope]
-
+
security.declareProtected(Permissions.AccessContentsInformation, 'getRamCacheFactoryPluginList')
def getRamCacheFactoryPluginList(self):
""" Return RAM based list of cache plugins for this factory """
return self.getRamCacheFactory().getCachePluginList()
-
+
def clearCache(self):
""" clear cache for this cache factory """
for cp in self.getRamCacheFactory().getCachePluginList():
More information about the Erp5-report
mailing list