I read some documentation about using turbine jcs-cache whith hibernate, and the behavior that the application should use for taking advantage os such a cache. If I understood well, the better approach for hitting the cache instead of querying the DB is to load objects by ID, hence using sess.iterate() instead of sess.find, and sess.filter() for filtering collections.
Let's talk about the latter method. It works fine if you have to show the entire collections, or a subset of the collection based on some query, but what about paging results ? Should I load the entire collection/list with sess.filter() and return only a subset using Java operations on list/set or whatever ? Does exists a query to pass in sess.filter() to let hibernate return just a sublist of the results ?
Any help is very appreciated
Renato
|