nordborg wrote:
The second-level cache can be used to cache the result of queries (Query.setCacheable(true)), so if you don't have many different <value> values this could work. The query cache only caches the primary keys of the entities. If you want to cache the full Range objects you need to configure that as well.
This table stores information about credit-card ranges. So there are a lot of possible <value> values.
I think caching the full Range objects is very hard for the performance, because this table has a considerable number of rows. So I'll try using Query.setCacheable(true) and check the performance.