README.rdoc

memcache-client

Installing memcache-client

Using memcache-client

With one server:

CACHE = MemCache.new 'localhost:11211'

Or with multiple servers:

CACHE = MemCache.new %w[one.example.com:11211 two.example.com:11211]

Tuning memcache-client

The MemCache.new method takes a number of options which can be useful at
times. Please read the source comments there for an overview. If you are
using Ruby 1.8.x and using multiple memcached servers, you should install
the RubyInline gem for ultimate performance.

Using memcache-client with Rails

Rails 2.1+ includes memcache-client 1.5.0 out of the box. See
ActiveSupport::Cache::MemCacheStore and the Rails.cache method for more
details. Rails 2.3+ will use the latest memcache-client gem installed.

Using memcache-client with EventMachine

memcache-client 1.8.0 added support for native EventMachine connections
using Ruby 1.9. If you are using an EventMachine-based application (e.g.
thin), you can activate the EventMachine support like so: