The frist level cache is definitely located in the RAM where the session is running, so it has performance and an easy-to-use advantage.
If you think that there are too many loaded objects in the session, you can cut some of the first level cache before closing the session. see Session Interface Source Code.
public interface Session extends Serializable { ... public void evict(Object object) throws HibernateException; }
source share