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. |
|