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: 1
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: 1272
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:SQL generated even for FetchType.LAZY reference
Goto Forum:
  


Current Time: Mon Nov 20 15:51:36 GMT 2017

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

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