Search code examples
memcachedfinagle

What is the flags arg in Finagle Memcached set method


com.twitter.finagle.memcached.Client defined the set method as

set(key: String, flags: Int, expiry: Time, value: T): Future[Unit]

What should the flags be? Is there any documentation available for this?


Solution

  • from: http://docs.libmemcached.org/memcached_set.html

    “flags” is a 4byte space that is stored alongside of the main value. Many sub libraries make use of this field, so in most cases users should avoid making use of it.