If I use memcached and I cache a million pages, will I not exit RAM?
Memcached
memcached is also a true solid product (for example, redis more), used on all major sites to maintain their performance. Almost all active tweets (which are retrieved by the user) are stored in memcached for insane performance.
If you want to be fast, you must have an active dataset in memory. But yes, if the data set is larger than your available memory, you should (always have to store data in a permanent data store, since memcached is volatile) store data in a permanent data store, for example, mysql. When it is not available in memory, you will try to extract it from the data store and cache its memcache for future use (with the expire header).
Redis
I really like redis because it is an extended key storage with insane performance
Redis is an extended keystore. It is similar to memcached, but the data set is not mutable, and the values ββcan be strings, just like memcached, but also lists, sets, and ordered sets. All these data types can manipulate atomic operations to push / pop elements, add / remove elements, make a server-side connection, intersection, difference between sets, and so on. Redis supports a variety of sorting options.
Redis has a VM , so you do not need a separate persistent data store. I really like redis because of all available (power :)?). This tutorial with simon willison displays (a lot) of the original power that redis has.
Speed
Redis is pretty fast! , 110000 SETs / second, 81000 GETs / second in the Linux field for entry-level. Check tests .
Fixation
Redis is more actively developing. 8 hours ago antirez (redis) did something against memcached on November 12, the last commit .
Install Redis
Redis is insanely easy to install. He has no dependencies. You only need to do:
make ./redis-server redis.conf
to compile redis (Awesome :)?).
Install memcached
Memcached has a dependency (libevent), which makes install difficult.
wget http://memcached.org/latest tar -zxvf memcached-1.xxtar.gz cd memcached-1.xx ./configure make && make test sudo make install
not entirely true, because memcached has a libevent dependency, and ./configure does not run libevent . But then again they are packages that are cool but require root to install.