memcached is very powerful, it is also very simple to install:

http://www.danga.com/memcached/download.bml

Download source, compile and install. Libevent library should pay attention to the existence of the development, if it is the Department of debian can do:

apt-get install libevent1-dev

Default is installed in / usr / local circumstances, and should be identified by other libraries.

debian can take reference from the Department of ubuntu start-up under way:

/ etc / init.d / memcached

/ etc / memcached.conf

start-memcached

ubuntu using apt to install memcached can be found on these files, change the path can be used.

Installation libmemcached, this is a very good client:

http://tangent.org/552/libmemcached.html

Stable version:
http://blog.evanweaver.com/files/libmemcached-0.25.14.tar.gz

Install memcached for ruby:
http://github.com/fauna/memcached/tree/master

Stable version:
http://blog.evanweaver.com/files/memcached-0.13.gem

The two versions can be together with.

Make reference to this:
http://quake.javaeye.com/blog/355312

After all is installed, you can use ruby-ri.

CACHE_SERVER="localhost:11211"
cache = Memcached.new(CACHE_SERVER)
cache.set("testkey","test value")


Used to put a number of constants and is the best session.