[jboss-user] [JBoss Cache: Core Edition] - Re: Why does em.persist resets the Query cache?

ryanrlamothe do-not-reply at jboss.com
Mon Feb 9 08:48:33 EST 2009

Here is some documentation for you to read concerning Query caching:

Also, you really need to make sure your cache configuration is correct and that you are actually using the cache as designed.  Which includes accurate and comprehensive unit tests, which it does not look like you are doing.

Manually controlling the query cache is not required for what you are doing.  Honestly, the only manual query cache configuration you should need to do is manually evicting queries before their normal eviction period has expired, but you really only need to do that under very specific circumstances.

Which brings up another point...if you mark the queries as READ_ONLY then you would be guaranteed the database is only read once.  But then you will need to make sure you inject the session manager and evict the query or query region in your entity facade whenever a save, update or delete occurs to a queried entity.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4208218#4208218

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4208218

More information about the jboss-user mailing list