L2 Cache

Thread is closed for posting
2 posts, 0 answers
  1. Steve
    Steve avatar
    1888 posts
    Member since:
    Dec 2008

    Posted 18 May 2010 Link to this post

    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 :)
  2. IT-Als
    IT-Als avatar
    381 posts
    Member since:
    Sep 2008

    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
Back to Top