Dear everybody! Thanks to view my question
Now I am using JPA cache level 2 and Hibernate/EclipseLink cache level 2. I saw eclipselink can support queryHint: eclipselink.cache-usage= CheckCacheOnly - Only check the cache and do not access the database. Return all objects found in the cache that match the query criteria. Note that not all queries can be conformed in memory
I would like to ask: 1. How to implement CheckCacheOnly query in hibernate? 2. Where JPA 2.0 & 2.1 support CheckCacheOnly or not? I saw JPA only support USE mode: When the property is set to USE, data is retrieved from the second-level cache, if available. If the data is not in the cache, the persistence provider will read it from the database.
I am looking forward to hearing from you!!!!!!
|