Commit 2f5aaf45 authored by Nicolas Delaby's avatar Nicolas Delaby

To follow Url propertysheet requirements , URL should starts with a protocol

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27925 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 14243e2b
...@@ -82,6 +82,8 @@ class CacheTool(BaseTool): ...@@ -82,6 +82,8 @@ class CacheTool(BaseTool):
elif cp_meta_type == 'ERP5 Distributed Ram Cache': elif cp_meta_type == 'ERP5 Distributed Ram Cache':
## 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
cache_obj = None
if getattr(cp, 'getSpecialiseValue', None) is not None:
memcached_plugin = cp.getSpecialiseValue() memcached_plugin = cp.getSpecialiseValue()
if memcached_plugin is not None: if memcached_plugin is not None:
init_dict = { init_dict = {
...@@ -90,10 +92,6 @@ class CacheTool(BaseTool): ...@@ -90,10 +92,6 @@ class CacheTool(BaseTool):
'server_max_value_length': memcached_plugin.getServerMaxValueLength(), 'server_max_value_length': memcached_plugin.getServerMaxValueLength(),
} }
cache_obj = DistributedRamCache(init_dict) cache_obj = DistributedRamCache(init_dict)
else:
## we don't have memcache python module installed
## thus we can't use DistributedRamCache plugin
cache_obj = None
if cache_obj is not None: if cache_obj is not None:
## 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()
......
...@@ -282,7 +282,8 @@ if memcache is not None: ...@@ -282,7 +282,8 @@ if memcache is not None:
memcached_plugin = self.restrictedTraverse(plugin_path, None) memcached_plugin = self.restrictedTraverse(plugin_path, None)
if memcached_plugin is None: if memcached_plugin is None:
raise ValueError, 'Memcached Plugin does not exists: %r' % (plugin_path,) raise ValueError, 'Memcached Plugin does not exists: %r' % (plugin_path,)
dictionary = MemcachedDict((memcached_plugin.getUrlString(),), url_string = memcached_plugin.getUrlString('')[len('memcached://'):]
dictionary = MemcachedDict((url_string,),
server_max_key_length=memcached_plugin.getServerMaxKeyLength(), server_max_key_length=memcached_plugin.getServerMaxKeyLength(),
server_max_value_length=memcached_plugin.getServerMaxValueLength()) server_max_value_length=memcached_plugin.getServerMaxValueLength())
memcached_dict_pool.memcached_dict = dictionary memcached_dict_pool.memcached_dict = dictionary
......
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