caching a query

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

caching a query

Matthew Broadhead-2
i have a query that takes around 8 seconds and i want cache it.  i
searched for caching a jpa query and came across query cache
https://openjpa.apache.org/builds/2.4.1/apache-openjpa/docs/ref_guide_caching.html#ref_guide_cache_query.
i tried pinning the query but it made no difference.
i also tried the hints javax.persistence.cache.retrieveMode and
javax.persistence.cache.storeMode but didn't see any difference there
either.
also tried adding @Cacheable to the Entity in question