Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » QUERY_RESULTS_CACHE vs CACHE_USAGE and QUERY_TYPE
QUERY_RESULTS_CACHE vs CACHE_USAGE and QUERY_TYPE [message #1736554] Thu, 30 June 2016 06:19 Go to next message
Eclipse UserFriend
Can you explain me what is the difference between

@QueryHint(name = QueryHints.CACHE_USAGE, value=CacheUsage.CheckCacheThenDatabase),
@QueryHint(name = QueryHints.QUERY_TYPE, value = QueryType.ReadObject),


and just

@QueryHint(name = QueryHints.QUERY_RESULTS_CACHE, value = "true")


has hints on a NamedQuery?
Re: QUERY_RESULTS_CACHE vs CACHE_USAGE and QUERY_TYPE [message #1736956 is a reply to message #1736554] Mon, 04 July 2016 11:08 Go to previous message
Eclipse UserFriend
Query results can be cached, so that if you execute the same query again, it doesn't hit the database. Your other setting, CACHE_USAGE and QUERY_TYPE are completely different. QUERY_TYPE sets the query object used underneath, allowing finer control if you are familiar with native EclipseLink api, while CACHE_USAGE gives options on how the entity cache is referenced on the query to allow for in-memory querying and other options.
Previous Topic:cascade.PERSIST on Map<Entity, Entity>
Next Topic:Criteria OrderBy
Goto Forum:
  


Current Time: Sun Oct 26 09:20:54 EDT 2025

Powered by FUDForum. Page generated in 0.06493 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top