Tuesday, 4 June 2013

Using MongoDB as a cache store

With the 5.3 release, there is a brand new feature. I'm glad to announce that you will be able to use MongoDB as a cache store.

For those who don't know MongoDB, it's an open-source document oriented NoSQL database developped by 10Gen. You can more information about it on http://www.mongodb.org/.

The question you have right now, it probably, how to use it cool cache store ? Simple, as for the other cache store you have to add a loader in your Infinispan configuration file.

Here is an exemple:

If you prefer the programmatic API:
For more information about the configuration possibilities (default values, options, etc) , you can refer to the documentation page

Hibernate OGM & Infinispan contributor
Blog / @g_scheibel


  1. Please share sample working project

  2. This comment has been removed by the author.

  3. This will not work, try infinispan.version 8.2.0.Final and infinispan.cachestore.mongodb.version 8.2.0.Final are working together.