10/23/2011

Memcache : how it works


It is a free & open source, high-performance, distributed memory object caching system.It is used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read. 
Memcached's APIs provide a giant hash table distributed across multiple machines. When the table is full, subsequent inserts cause older data to be purged in least recently used (LRU) order. The system uses a client–server architecture. The servers maintain a key–value associative array; the clients populate this array and query it. The only limitation with memcached is keys are up to 250 bytes long and values can be at most 1 megabyte in size.
Clients must treat Memcached as a transitory cache; they cannot assume that data stored in Memcached is still there when they need it. A Memcached-protocol compatible product known as MemcacheDB provides persistent storage.



Memcached is best implemented for queries that are triggered multiple times in a second and demand huge data as output. Access to Memcached data is faster than the access time to disk drives because the Memcached data is stored in temporary memory

0 comments:

Post a Comment