Commit 12b7e26f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

try to also use the server attribute in a Distributed Ram Cache object for backward compatibility.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27557 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e23c2a04
...@@ -89,7 +89,13 @@ class CacheTool(BaseTool): ...@@ -89,7 +89,13 @@ class CacheTool(BaseTool):
## 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 is not None: if memcache is not None:
cache_obj = DistributedRamCache({'server': cp.getServer()}) try:
cache_obj = DistributedRamCache(
{'server':cp.getSpecialiseValue().getUrlString()})
except AttributeError:
# BACKWARD COMPATIBILITY
cache_obj = DistributedRamCache(
{'server':getattr(cp, 'server', '')})
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
......
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