Users who have contributed to this file

memcached

An interface to the libmemcached C client.

License

Copyright 2009-2013 Cloudburst, LLC. Licensed under the AFL 3. See the
included LICENSE file. Portions copyright 2007-2009 TangentOrg, Brian Aker,
licensed under the BSD license, and used with permission.

Features

clean API

robust access to all memcached features

SASL support for the binary protocol

multiple hashing modes, including consistent hashing

ludicrous speed, including optional pipelined IO with no_reply

The memcached library wraps the pure-C libmemcached client via SWIG.

Installation

You need Ruby 1.8.7 or Ruby 1.9.2. Other versions may work, but are not
guaranteed. You also need the `libsasl2-dev` and `gettext` libraries, which
should be provided through your system's package manager.

Install the gem:

sudo gem install memcached --no-rdoc --no-ri

Usage

Start a local networked memcached server:

$ memcached -p 11211 &

Now, in Ruby, require the library and instantiate a Memcached object at a
global level:

Note that the API is not the same as that of Ruby-MemCache or
memcache-client. In particular, nil is a valid record
value. Memcached#get does not return nil on failure, rather it
raises Memcached::NotFound. This is consistent with the behavior of
memcached itself. For example: