Commit 0665bb6d authored by Nicolas Delaby's avatar Nicolas Delaby

rename Portal Type and typo

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27175 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6a92857f
......@@ -76,7 +76,7 @@ class CacheTool(BaseTool):
security.declareProtected(Permissions.AccessContentsInformation, 'getCacheFactoryList')
def getCacheFactoryList(self):
""" Return available cache factories """
rd ={}
rd = {}
for cf in self.objectValues('ERP5 Cache Factory'):
cache_scope = cf.getId()
rd[cache_scope] = {}
......@@ -102,7 +102,7 @@ class CacheTool(BaseTool):
kw = self.parseDBConnectionString(connection_string)
kw['cache_table_name'] = cp.getCacheTableName()
cache_obj = SQLCache(kw)
elif cp_meta_type == 'ERP5 Zodb Cache':
elif cp_meta_type == 'ERP5 ZODB Cache':
cache_obj = ZODBCache(dict(cache_tool=self))
if cache_obj is not None:
## set cache expire check interval
......@@ -182,8 +182,8 @@ class CacheTool(BaseTool):
del cp
CachingMethod.factories = {}
## read configuration from ZODB
for key,item in self.getCacheFactoryList().items():
if len(item['cache_plugins'])!=0:
for key, item in self.getCacheFactoryList().items():
if len(item['cache_plugins']):
## init cache backend storages
for cp in item["cache_plugins"]:
cp.initCacheStorage()
......@@ -223,7 +223,6 @@ class CacheTool(BaseTool):
if REQUEST is not None:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache factory %s cleared.' %cache_factory_id)
security.declareProtected(Permissions.ModifyPortalContent, 'clearCache')
def clearCache(self, cache_factory_list=(DEFAULT_CACHE_FACTORY,), REQUEST=None):
""" Clear specified or default cache factory. """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment