Skip to main content

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

The cache-usage query hint makes sense to me (http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#Cache_Usage).

The maintain-cache query hint does not (http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#Maintain_Cache).

My use case is the exceptionally brain-dead common example of caching a list of drop-down options.  The JPQL query in question is basically like one you'd write for U. S. states:

  SELECT s FROM State s ORDER BY s.code;

If I wanted this query to return results from the cache whenever possible, which of these two query hints should I use?  Or is there (preferably) a JPA-sanctioned query hint that would do the same thing?

Thanks,
Laird

Back to the top