Multiple choice technology web technology

What does session.evict() method do ?

  1. remove the object and its collections from the first level cache

  2. remove the object and its collections from the second level cache

  3. remove the object and its collections from the data base

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The evict() method removes an object and its associated collections from the first-level cache (Session cache). It does NOT affect the second-level cache or delete from the database - it just detaches from the session.