infinispan/infinispan-cachestore-mongodb — pull request #4 by gabfssilva (2014-02-23 01:39:18+00:00)
Title: Infinispan 6.x Cache Store MongoDB

This is a Infinispan 6.x cache store, that uses MongoDB as store.

Some basic usage:

```
Configuration sample = builder
.eviction()
.strategy(EvictionStrategy.LIRS)
.maxEntries(2000000)
.expiration()
.lifespan(10, TimeUnit.MINUTES)
.maxIdle(10, TimeUnit.MINUTES)
.jmxStatistics()
.persistence()
.addStore(MongoDBStoreConfigurationBuilder.class)
.hostname("localhost")
.port(27017)
.database("example")
.collection("example")
.build();

EmbeddedCacheManager cacheManager = new DefaultCacheManager();
cacheManager.defineConfiguration("mongoCache", sample);
Cache cache = cacheManager.getCache("mongoCache");
```

The main reason why I implemented my own Mongo cache store is because there isn't any for the 6.x version.