0

I found sample code about using libmemcached in C/C++. But I don't understand the meaning of two timeout:

  1. memcached_timeout of memcached_behavior_set()
  2. expire of memcached_set()

    rc = memcached_behavior_set( memc_primary, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT , memcached_timeout );

    rc = memcached_set( memc_primary, memcached_key_val, memcached_key_len, save_value, strlen( save_value ), expire, 0 );

Could you please explain what they are used for?

Thank you very much!

GSP
  • 574
  • 3
  • 7
  • 34
  • Did you read [the documentation](http://docs.libmemcached.org/memcached_behavior.html)? – unwind Jun 26 '15 at 11:54
  • @unwind, Yes, But it said that **In non-blocking mode this changes the value of the timeout during socket connection in milliseconds. Specifying -1 means an infinite time‐out**. Is it timeout of socket connection? And what is meaning of `expire` in memcached_set()? – GSP Jun 29 '15 at 01:44

0 Answers0