Utilising Memcache to radically speed up your applications performance
Friday, January 6th, 2012Memcache has been around for some time now, developed by Brad Fitzpatrick in 2003 for Live Journal; Memcache has matured gradually over the years for being a great method of improving the performance of many types of applications by storing arbitrary chunks of data in memory via a key / object store. It has a popular adoption rate with many well-known sites such as YouTube, Twitter and Linked-In all employing Memcache in some capacity to improve performance by alleviating load on any database servers.
At Rapid Web we have been employing Memcache techniques in some of most our most intensive internal and client systems. Typical implementations usually involve storing the results of a particular function call for either duration or for a long as possible. When the same function is called a subsequent time, the function determines if the data is already cached, if this is the case the result returned comes directly from the cache. The result is only then recomputed when the data falls out of memory, which occurs when a potential expiration value has been exceeded or there is limited memory available in which case Memcache removes the least requested cache item.
Developing responsive applications is certainly a critical consideration when building new applications. Recently we developed a new type of caching manager for a Stock System. This system holds large sets of data and deals with a variety of different computations for managing stock and processing orders. We found that by caching even the most trivial aspects of system, such as – item to process counters, and all non-critical elements, it all makes a difference. This not only drastically improves the application speed, but this as a direct result radically improves the browsing experience by removing the need to recompute intensive operations on page load.
We highly recommend trying Memcache, or standard file caching methods when speed is key.







