Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Difference between cache-usage and maintain-cache query hints?

On Thu, Mar 17, 2011 at 9:23 AM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
 Cache_Usage controls whether the cache is used to get results in a read. e.g. if you set the cache usage to CheckCacheThenDatabase when this query is executed, results in the cache will be prioritized over results in the DB.

OK; my understanding was this only applied to individual objects.  So if I had a query like

  SELECT o FROM SomeEntity o WHERE o.id = :pk

...then o would be retrieved from the cache.  The documentation begins talking about ReadObject queries vs. ReadAll queries, which of course mean nothing to me as I'm coding to the JPA API.

Then I also found (somewhere else) the eclipselink.query-results-cache query hint, which would seem to be the same thing.  Should I use one of these hints?  Both of them?

Thanks very much for your help.

Best,
Laird

Back to the top