Jakarta Persistence (JPA) Method

TypedQuery<X> setCacheRetrieveMode(
  CacheRetrieveMode cacheRetrieveMode
)


Set the cache retrieval mode that is in effect during query execution. This cache retrieval mode overrides the cache retrieve mode in use by the entity manager.
Parameters:
cacheRetrieveMode - cache retrieval mode
Returns:
the same query instance.
Since:
Jakarta Persistence (JPA) 3.2