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): ...@@ -76,7 +76,7 @@ class CacheTool(BaseTool):
security.declareProtected(Permissions.AccessContentsInformation, 'getCacheFactoryList') security.declareProtected(Permissions.AccessContentsInformation, 'getCacheFactoryList')
def getCacheFactoryList(self): def getCacheFactoryList(self):
""" Return available cache factories """ """ Return available cache factories """
rd ={} rd = {}
for cf in self.objectValues('ERP5 Cache Factory'): for cf in self.objectValues('ERP5 Cache Factory'):
cache_scope = cf.getId() cache_scope = cf.getId()
rd[cache_scope] = {} rd[cache_scope] = {}
...@@ -102,7 +102,7 @@ class CacheTool(BaseTool): ...@@ -102,7 +102,7 @@ class CacheTool(BaseTool):
kw = self.parseDBConnectionString(connection_string) kw = self.parseDBConnectionString(connection_string)
kw['cache_table_name'] = cp.getCacheTableName() kw['cache_table_name'] = cp.getCacheTableName()
cache_obj = SQLCache(kw) 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)) cache_obj = ZODBCache(dict(cache_tool=self))
if cache_obj is not None: if cache_obj is not None:
## set cache expire check interval ## set cache expire check interval
...@@ -182,8 +182,8 @@ class CacheTool(BaseTool): ...@@ -182,8 +182,8 @@ class CacheTool(BaseTool):
del cp del cp
CachingMethod.factories = {} CachingMethod.factories = {}
## read configuration from ZODB ## read configuration from ZODB
for key,item in self.getCacheFactoryList().items(): for key, item in self.getCacheFactoryList().items():
if len(item['cache_plugins'])!=0: if len(item['cache_plugins']):
## init cache backend storages ## init cache backend storages
for cp in item["cache_plugins"]: for cp in item["cache_plugins"]:
cp.initCacheStorage() cp.initCacheStorage()
...@@ -223,7 +223,6 @@ class CacheTool(BaseTool): ...@@ -223,7 +223,6 @@ class CacheTool(BaseTool):
if REQUEST is not None: if REQUEST is not None:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache factory %s cleared.' %cache_factory_id) self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache factory %s cleared.' %cache_factory_id)
security.declareProtected(Permissions.ModifyPortalContent, 'clearCache') security.declareProtected(Permissions.ModifyPortalContent, 'clearCache')
def clearCache(self, cache_factory_list=(DEFAULT_CACHE_FACTORY,), REQUEST=None): def clearCache(self, cache_factory_list=(DEFAULT_CACHE_FACTORY,), REQUEST=None):
""" Clear specified or default cache factory. """ """ 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