public
Fork of fiveruns/memcache-client
Description: Ruby library for accessing memcached.
Homepage:
Clone URL: git://github.com/mperham/memcache-client.git
Click here to lend your support to: memcache-client and make a donation at www.pledgie.com !
mperham (author)
Sat Nov 28 16:25:59 -0800 2009
commit  a210b5c377afbaddc2297f98fca88f84505399af
tree    b7e5d61a9c0270f98024fe521c57ec3088075711
parent  cf87d8143b75e1353f9d8f22f22420b794f3b986
name age message
file .gitignore Thu Oct 29 16:58:43 -0700 2009 Miscellania [mperham]
file FAQ.rdoc Fri Nov 27 08:54:37 -0800 2009 Remove trailing whitespace [menno]
file History.rdoc Sat Nov 28 16:25:59 -0800 2009 Give props [mperham]
file LICENSE.txt Wed Jan 14 19:11:39 -0800 2009 Pull socket timeout fixes from 37signals. Remov... [mperham]
file README.rdoc Fri Nov 27 08:54:37 -0800 2009 Remove trailing whitespace [menno]
file Rakefile Fri Nov 27 08:54:37 -0800 2009 Remove trailing whitespace [menno]
file VERSION.yml Fri Nov 27 08:54:37 -0800 2009 Remove trailing whitespace [menno]
directory lib/ Fri Nov 27 08:54:37 -0800 2009 Remove trailing whitespace [menno]
file performance.txt Tue Nov 03 18:33:30 -0800 2009 Final doc cleanup, release 1.7.6 [mperham]
directory test/ Fri Nov 27 08:54:37 -0800 2009 Remove trailing whitespace [menno]
README.rdoc

memcache-client

A ruby library for accessing memcached.

Source:

github.com/mperham/memcache-client

Installing memcache-client

Just install the gem:

  $ sudo gem install 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.

Questions?

memcache-client is maintained by Mike Perham and was originally written by Bob Cottrell, Eric Hodel and the seattle.rb crew.

Email:mperham@gmail.com
Twitter:mperham
WWW:mikeperham.com

If my work on memcache-client is something you support, please take a moment to recommend me at WWR. I’m not asking for money, just a electronic "thumbs up".