Commit d07a958f authored by Nicolas Delaby's avatar Nicolas Delaby

revert r29556, this "if" condition exists to avoid instanciation of...

revert r29556, this "if" condition exists to avoid instanciation of CacheFactory without cache plugins

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29639 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 835757a5
...@@ -118,10 +118,12 @@ class CacheTool(BaseTool): ...@@ -118,10 +118,12 @@ class CacheTool(BaseTool):
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():
## init cache backend storages #If there is no cache_plugins, do not create Cache Factory
for cp in item["cache_plugins"]: if item["cache_plugins"]:
cp.initCacheStorage() ## init cache backend storages
CachingMethod.factories[key] = CacheFactory(item['cache_plugins'], item['cache_params']) for cp in item["cache_plugins"]:
cp.initCacheStorage()
CachingMethod.factories[key] = CacheFactory(item['cache_plugins'], item['cache_params'])
if REQUEST is not None: if REQUEST is not None:
self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache updated.') self.REQUEST.RESPONSE.redirect('cache_tool_configure?manage_tabs_message=Cache updated.')
......
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