-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
Medium
This will prevent loading too much into memory causing OOMs, as well as unnecessary eviction thread churn. Probably would require another CacheLoader interface method such as loadAll(int maxEntries). A default version of this method could just call loadAll() and trim the resultset to size, and more sophisticated impls could only load the necessary number of entries, such as a LIMIT SQL query for the JDBC cache stores.