Configurable cache update strategy for entity loading with Hibernate ORM

Description

Currently we always use the default cache update strategy when loading query results, and that deafult strategy is CacheStoreMode.USE: put entities into the cache when they are loaded as part of a query (but don't refresh the cache if they are already there).

I can imagine this strategy being annoying when one expects very few cache hits from search queries.

Let's add a configuration property alongside the cache lookup strategy, to configure how search hits are *added* to the cache. The implementation will translate directly into the CacheStoreMode of Hibernate ORM queries.

Environment

None

Assignee

Unassigned

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major
Configure