1: No, there isn't. First-level cache is a transaction-scope cache, and is also used to guarantee uniqueness.
2: This usage pattern looks strange, you should open a session for the duration of one transaction (even if the whole transaction is just an update of a single field of an object) and then close it. Don't think of a session as a data gateway, think of it as a... well... a session :), a unit of work, a transaction - you open it, do the work (one or several related transactions), and then close it.
|