Sorry, I should have put my references:
Hibernate reference, 19.3. Managing the caches
Quote:
Whenever you pass an object to save(), update() or saveOrUpdate() and whenever you retrieve an object using
load(), get(), list(), iterate() or scroll(), that object is added to the internal cache of the Session.
In section 10.4 of the Hibernate Reference:
Quote:
Occasionally, you might be able to achieve better performance by executing the query using the iterate()
method. This will only usually be the case if you expect that the actual entity instances returned by the query
will already be in the session or second-level cache. If they are not already cached, iterate() will be slower
than list() and might require many database hits for a simple query, usually 1 for the initial select which only
returns identifiers, and n additional selects to initialize the actual instances.
This tells me that the first time you load the objects, you should use list(), and then on subsequent calls, you should use iterate().