Posted 19 May 2010
Link to this post
Hi Steve,
When adding records I cannot see any other way that evicting the L2 cache through the Cache API for that specific persistent class (one of the Evict method overloads).
However, when you do removals, you can do a evict of that specific (removed) item.
As always, it depends on the usage scenario if it makes sense or not. As I see it, there's always a gain in using the L2 cache. The performance is just better.... even though you have to do evictions from time to time when you add something "manually" to your database.
Regards
Henrik