Over a million developers have joined DZone.

Imcache : A new caching framework for Java

·

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.

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}