Commit f445f684 authored by Romain Courteaud's avatar Romain Courteaud

Do not use tab for indenting the code.

Always use space !


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11084 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 09842aaf
...@@ -72,26 +72,26 @@ class CacheTool(BaseTool): ...@@ -72,26 +72,26 @@ class CacheTool(BaseTool):
rd[cache_scope]['cache_plugins'] = [] rd[cache_scope]['cache_plugins'] = []
rd[cache_scope]['cache_params'] = {} rd[cache_scope]['cache_params'] = {}
for cp in cf.getCachePluginList(): for cp in cf.getCachePluginList():
cache_obj = None cache_obj = None
cp_meta_type = cp.meta_type cp_meta_type = cp.meta_type
if cp_meta_type == 'ERP5 Ram Cache Plugin': if cp_meta_type == 'ERP5 Ram Cache Plugin':
cache_obj = RamCache() cache_obj = RamCache()
elif cp_meta_type == 'ERP5 Distributed Ram Cache Plugin': elif cp_meta_type == 'ERP5 Distributed Ram Cache Plugin':
## even thougn we have such plugin in ZODB that doens't mean ## even thougn we have such plugin in ZODB that doens't mean
## we have corresponding memcache module installed ## we have corresponding memcache module installed
if 'memcache' in globals().keys(): if 'memcache' in globals().keys():
cache_obj = DistributedRamCache({'server':cp.getServer()}) cache_obj = DistributedRamCache({'server':cp.getServer()})
else: else:
## we don't have memcache python module installed ## we don't have memcache python module installed
## thus we can't use DistributedRamCache plugin ## thus we can't use DistributedRamCache plugin
cache_obj = None cache_obj = None
elif cp_meta_type == 'ERP5 SQL Cache Plugin': elif cp_meta_type == 'ERP5 SQL Cache Plugin':
## use connection details from 'erp5_sql_transactionless_connection' ZMySLQDA object ## use connection details from 'erp5_sql_transactionless_connection' ZMySLQDA object
connection_string = self.erp5_sql_transactionless_connection.connection_string connection_string = self.erp5_sql_transactionless_connection.connection_string
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)
if cache_obj: if cache_obj:
## set cache expire check interval ## set cache expire check interval
cache_obj.cache_expire_check_interval = cp.getCacheExpireCheckInterval() cache_obj.cache_expire_check_interval = cp.getCacheExpireCheckInterval()
rd[cache_scope]['cache_plugins'].append(cache_obj) rd[cache_scope]['cache_plugins'].append(cache_obj)
......
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