Friday, 27 June 2014

Memcache

Memcache 

           Free & open source, high-performance, distributed memory object caching system, but intended for use in speeding up dynamic web-apps by reducing database load.

Memcache is an arbitrary in memory storage i.e. it sits in the RAM where it stores small chunks of data possibly in key-value pairs that may be the response for database calls, API calls or page renders.

Key benefit of memcache is it has APIs for almost all programming language.

Java Caching Frameworks 

              Traditional Java caching frameworks are EHCache & OSCache are basicallly HashMap objects. Whenever  you add a new object in your cache it adds to the memory for your application. This strategy works when your data to be cached is in some MBs or probably KBs. But in large applications these framework falter because of their capacity to cache the objects. This is where memcache comes into picture. Unlike EHCache and OSCache where these are a part of your application memcache comes into two pieces - Memcache Server and Memcache client .  

Memcache :- 
         Memcache server runs as a separate process it stores all the cached object. For every memcache client there is a memcache server mapped wherein it gets the cache object from . Organizing data into memcache is based on key,value pairs.







No comments: