Linq to SQL Cache Dependency

I would like to hear people's opinions on the pros and cons of mixing SQL Cache dependencies with Linq to SQL, as described in this article:

http://code.msdn.microsoft.com/linqtosqlcache

This works for me, but I'm curious to know if anyone has any alternatives?

Cheers, Tim

+4
source share
2 answers

In my experience, Linq to SQL already makes some kind of optimistic cache. We had problems updating and outdated data when using Linq to SQL, and before proceeding, you had to force the stream. This article may help: http://weblogs.asp.net/scottgu/archive/2007/08/27/linq-to-sql-part-8-executing-custom-sql-expressions.aspx I also know that he can also use ASP.NET cache, so searching using both of these keywords can help.

+1
source

I was just about to ask the same question. No comments have been added on a topic that surprises me, how do people cache linqtosql anyway?

I also tried the example in the same post http://code.msdn.microsoft.com/linqtosqlcache

but the problem is with assigning this code to all tables in my database. Some tables work as expected, but others always delete the cache key. What / where should I look at this?

+1
source

All Articles