Category: Caching

Lua scripting in Redis 0

Lua scripting in Redis

Lua Scripting You can kind of think of lua scripts like redis’s own SQL or stored procedures. It’s both more and less than that, but the analogy mostly works. Maybe you have complex calculations...

Why is memcached slow as compared to ehcache 0

Why is memcached slow as compared to ehcache

Should you choose memcached or ehcache? Aside from the API differences you noted, the major difference here is going to be that memcached lives in a different process while Ehcache is internal to the...

Can we use JCS for di 0

Can we use JCS for distributed cache?

JCS is a very popular caching framework since early 2000s. It claims to be more faster than ehcache for heavy get operations related applications. They also claim that they can be used as distributed...

How to Implement a LRU Cache 0

How to Implement a LRU Cache

Typically LRU cache is implemented using a doubly linked list and a hash map. Doubly Linked List is used to store list of pages with most recently used page at the start of the...

How to store Java objects in Redis 0

How to store Java objects in Redis

Redis is one of the most poplar caching solution currently used by various companies. It can act as a cache as well as database and is a simple key-value storage system. As we know...

How to add Auxiliary cache programitically in JCS 0

How to add Auxiliary cache programitically in JCS

In JCS we can enable cache overflow/persistence to disk by using indexed disk cache. We can easily configure this in cache.ccf file like this : jcs.auxiliary.DC=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory jcs.auxiliary.DC.attributes=org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes jcs.auxiliary.DC.attributes.DiskPath=c:/downloads/cache jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000 jcs.auxiliary.DC.attributes.MaxKeySize=10000 What if you want...