title: Hazelcast, MongoDB persitance
body: <p>I am currently using Hazelcast Community Edition as a caching mechanism used for a web application so it <em>needs to be fast</em>. </p>
  
  <p>Currently, we store a <em>lot</em> of data in there and this is growing even more. As it's an in-memory DB, RAM is expensive. So wanted to know what the best practice was. I was planning to store only a small amount of data in the cache and store the rest in MongoDB. I want Hazelcast to persist and get the data from MongoDB only if it can't find it.</p>
  
  <p>I have created the mapstore, but I am not sure how to tell it to "look" in MongoDB for data it can't find in the cache. Is it simply the case of <code>getMap("something")</code> if this result is empty then <code>load("")</code> from MapStore?</p>
  
  <p>Thanks</p>