Loading
Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents
Contents
 Search
Other Searches
 PDF
PDF
Comments
Comments


query-results-cache.expiry

Use eclipselink.query-results-cache.expiry to set the time-to-live (that is, expiration time) of the query's results cache.


Values

Table 4-28 describes this query hint's values.

Table 4-28 Valid Values for query-results-cache.expiry

Value Description

Value

Number of milliseconds, as Integer or Strings that can be parsed to int values.



Usage

By default the query results cache will not expiry results.


Examples

Example 4-57 Using query-results-cache.expiry in a JPA Query

import org.eclipse.persistence.config.HintValues;
 import org.eclipse.persistence.config.QueryHints;
 query.setHint("eclipselink.QUERY_RESULTS_CACHE_EXPIRY", "100");

Example 4-58 Using query-results-cache.expiry in a @QueryHint Annotation

import org.eclipse.persistence.config.HintValues;
 import org.eclipse.persistence.config.QueryHints;
 @QueryHint(name=QueryHints.QUERY_RESULTS_CACHE_EXPIRY, value="100");


See Also

For more information, see:

Comments powered by Disqus