I am using DN3 and GAE 1.7.4. I use JPA2 which according to the documentations by default has Level2 cache enabled.
Here is my question:
If I run a query that returns some objects, would these objects be put in the cache automatically by their ID?
If I run em.find()
with an id of an object which has already been loaded with another query createQuery().getResultList()
would it be available in the cache?
Do I need to run my em.find()
or query in a transaction in order for the cache to kick in?
I need some clarification on how this cache works and how I could do my queries/finds/persists in order to make the best use of the cache.
Thanks