Commit 56243897 authored by Nicolas Delaby's avatar Nicolas Delaby

do not discard server_max_key_length and server_max_value_length parameters

if there are not True.
0 is an expected value (means no limitation of size)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29154 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7fd0159e
...@@ -76,8 +76,8 @@ if memcache is not None: ...@@ -76,8 +76,8 @@ if memcache is not None:
- make picklable ? - make picklable ?
""" """
def __init__(self, server_list=('127.0.0.1:11211',), server_max_key_length=None, def __init__(self, server_list=('127.0.0.1:11211',), server_max_key_length=MARKER,
server_max_value_length=None): server_max_value_length=MARKER):
""" """
Initialise properties : Initialise properties :
memcached_connection memcached_connection
...@@ -96,9 +96,9 @@ if memcache is not None: ...@@ -96,9 +96,9 @@ if memcache is not None:
self.local_cache = {} self.local_cache = {}
self.scheduled_action_dict = {} self.scheduled_action_dict = {}
init_dict = {} init_dict = {}
if server_max_key_length: if server_max_key_length is not MARKER:
init_dict['server_max_key_length'] = server_max_key_length init_dict['server_max_key_length'] = server_max_key_length
if server_max_value_length: if server_max_value_length is not MARKER:
init_dict['server_max_value_length'] = server_max_value_length init_dict['server_max_value_length'] = server_max_value_length
self.memcached_connection = memcache.Client(server_list, **init_dict) self.memcached_connection = memcache.Client(server_list, **init_dict)
......
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