codecompleting
codecompleting

Reputation: 9611

How to purge level 1 and level 2 cache?

I want to know if it is possible to purge the level 1 cache in nhibernate?

What about level 2?

Upvotes: 1

Views: 169

Answers (1)

jeha
jeha

Reputation: 10730

The level 1 cache is more commonly refered to as the session.

Simply do

session.Clear()

You could also use session.Evict(instanceToEvict) to just evict selectively.

Upvotes: 2

Related Questions