This is a migrated thread and some comments may be shown as answers.

L2 Cache

1 Answer 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
sitefinitysteve asked on 18 May 2010, 01:00 PM
If someone adds in a record to my table via a standard tableadapter the L2 Cache doesn't pick up the change, and keeps sending me down the old results.

So I have to evict the cache before the query which really eliminates the benefit of the L2

There's no way around this is there :)

1 Answer, 1 is accepted

Sort by
0
IT-Als
Top achievements
Rank 1
answered on 19 May 2010, 05:41 AM
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
Tags
General Discussions
Asked by
sitefinitysteve
Top achievements
Rank 2
Iron
Veteran
Answers by
IT-Als
Top achievements
Rank 1
Share this question
or