Memcached can cache very fast in-memory with very simple and very benefits. It is process built on machine and many APservers. When request to memcached , if there is a cache data in memcached, APserver can get response this data. but there isn't, APserver requests to database to get data and write this data to memcached.
- fast : because not disk but memory
- not durable : to be in memory
- limited by memory : don’t store data more machine’s memory capacity
When you store more data in memcached than there is memory available, throw away data that is least recently used. not LFU(least frequently used) but LRU(least recently used). You can write the extra data to disk, which called swap. but Swap don’t fast because Writting Disk is slower than writting memory.