Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:19 Go to next message
Alberto Gori is currently offline Alberto GoriFriend
Messages: 2
Registered: June 2016
Junior Member
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 15:08 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
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: Fri Sep 20 13:43:59 GMT 2024

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

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

Back to the top