What's the default behavior of memcache for MEMCACHED_BEHAVIOR_NO_BLOCK?

186 views Asked by At

As is stated in the doc

"Default behavior is the library strives to be quick and accurate"

and

MEMCACHED_BEHAVIOR_NO_BLOCK
Causes libmemcached(3) to use asychronous IO. This is the fastest transport available for storage functions.

I want to know if the default value for MEMCACHED_BEHAVIOR_NO_BLOCK is 1?

1

There are 1 answers

0
m6w6 On BEST ANSWER

The default is false, you can verify that with memcached_behavior_get.

This behavior is not analogous to SO_NONBLOCK/O_NONBLOCK/FIONBIO, because libmemcached always uses non blocking sockets. See here, here and here.

It might be due to historic reasons, but nowadays it doesn't do more than setting SO_LINGER.