Am using loading cache to cache the result of the query. As far as I know, If the key is not found in cache, it will load from DB. While loading will it populate the cache simultaneously?
CacheLoader <String, Obj> Loader = new CacheLoader<String, Obj>() { @Override public Obj load(String key) throws Exception { Obj obj = ObjDao.getDs().createQuery(Obj.class).filter("id ==", key).get(); return obj; } };