- if (data)
- {
- (void)memcached_behavior_set_key_hash(ptr, MEMCACHED_HASH_MD5);
- (void)memcached_behavior_set_distribution_hash(ptr, MEMCACHED_HASH_MD5);
- (void)memcached_behavior_set_distribution(ptr, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA);
- }
- else
- {
- (void)memcached_behavior_set_key_hash(ptr, MEMCACHED_HASH_DEFAULT);
- (void)memcached_behavior_set_distribution_hash(ptr, MEMCACHED_HASH_DEFAULT);
- (void)memcached_behavior_set_distribution(ptr, MEMCACHED_DISTRIBUTION_MODULA);
- }