In this example I’ll be showing you how to read and write from a memcached server using PHP5, using singleton class design and some basic static functions to connect your servers up before performing the caching. For those of you who don’t know what memcached is I have included the description from the memcached website below.
If you want to know more technical information visit the official website: memcached.org
“Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.”