Skip to content

Commit e4bfada

Browse files
[Cache] enable Memcached::OPT_TCP_NODELAY to fix perf of misses
1 parent 817e7cd commit e4bfada

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/Cache/Traits/MemcachedTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public static function createConnection($servers, array $options = array())
134134
$options = array_change_key_case($options, CASE_UPPER);
135135
$client->setOption(\Memcached::OPT_BINARY_PROTOCOL, true);
136136
$client->setOption(\Memcached::OPT_NO_BLOCK, true);
137+
$client->setOption(\Memcached::OPT_TCP_NODELAY, true);
137138
if (!array_key_exists('LIBKETAMA_COMPATIBLE', $options) && !array_key_exists(\Memcached::OPT_LIBKETAMA_COMPATIBLE, $options)) {
138139
$client->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
139140
}

0 commit comments

Comments
 (0)