How to Cache Query Results

If em is the EntityManager, then the following query results will be cached:

Query query = em   .createQuery("SELECT u FROM User u");       query.setHint("eclipselink.cache-usage", "CheckCacheThenDatabase"); 
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Related Posts