Memcached tutorial

Memcached is a free, open source, high performance, distributed memory object caching system.

Memcached is a software developed by Brad Fitzpatric of LiveJournal's Danga Interactive. Now it has become an important factor in improving the scalability of Web applications among many services such as mixi, hatena, Facebook, Vox, and LiveJournal.

Memcached is a memory-based key-value store used to store small pieces of arbitrary data (strings, objects). This data can be the result of a database call, an API call, or a page render.

Memcached is simple and powerful. Its compact design facilitates rapid development, eases development, and solves many problems with large data caches. Its API is compatible with most popular development languages.

Essentially, it's a simple key-value storage system.

The general purpose of the application is to reduce the number of database accesses by caching database query results to improve the speed and scalability of dynamic web applications.

Memcached official website: http://memcached.org/.


Memcached is a distributed cache server running at high speed and has the following features.

  • Simple protocol
  • Event processing based on libevent
  • Built-in memory storage
  • memcached distributed without communication

Supported languages

Many languages implement a client that connects to memcached, with Perl and PHP as the mainstay. Only the memcached sites listed are:

  • Perl
  • PHP
  • Python
  • Ruby
  • C#
  • C/C++
  • Lua
  • etc.

Memcached user

  • LiveJournal
  • Wikipedia
  • Flickr
  • Bebo
  • Twitter
  • Typepad
  • Yellowbot
  • Youtube
  • WordPress.com
  • Craigslist
  • Mixi