[Logo]
Forums Register Login
How setCacheable of Query will work
I have created a query for select Operation in Hibernate using



I think that If i specify setCacheable true of Query then this will not hit the database and return data from Cache ?


Please tell me if my understanding is right or wrong on this ??

Thanks in advance



The query cache does not cache the entire object, as the first and second level cached do, it caches the query plus the returned identifiers. Remember not all queries willl return whole populated objects after all. Hibernate will uses these identifiers to access data possibly cached in the second level cache. If its not cached there it will hit the database.
Thank you , it was a valuable information .

" Hibernate will sues these identifies to access data possibly cached in the second level cache. "

Can you please tell what the above statement actualy means ?

Thanks in advance.
Sorry, sloppy typing. See above.

Thank You very much paul

I have cleared my query with Query Cache .

I have an another query also what if i use cache at Object level . Does this also require second level cache?



Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 24, 2017 22:45:56.