I am a software engineer and blogger. I try to post to my blog whenever I have free time. My passion is to learn new things each day. Yusuf is a DZone MVB and is not an employee of DZone and has posted 12 posts at DZone. You can read more from them at their website. View Full User Profile

Imcache : A new caching framework for Java

01.02.2014
| 2596 views |
  • submit to reddit

Imcache is a Java Caching Library. It supports various kinds of caching models that have been applied so far. Imcache intends to speed up applications by providing a means to manage cached data. It offers solutions ranging from small applications to large scale applications. Dependency for imcache is as follows.

<dependency>
  <groupId>com.cetsoft</groupId>
  <artifactId>imcache</artifactId>
  <version>0.0.8</version><!--Can be updated for later versions-->
</dependency>

Imcache supports heap and off-heap caching for the time being but it is going to support distributed caching in the near future. Let's have a look at imcache in action below.

void example(){
    Cache<Integer,Integer> cache = CacheBuilder.heapCache().
    cacheLoader(new CacheLoader<Integer, Integer>() {
        public Integer load(Integer key) {
            return null;
        }
    }).capacity(10000).build();
 
    cache.put(10,10);
    cache.get(10);
}

Open source ninjas are wanted to build the next generation of the imcache! Please, check out the current version on githup and if you are interested, please get in touch with me.

0
Average: 5 (2 votes)
Published at DZone with permission of Yusuf Aytaş, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)