开发者

SqlCacheDependency & custom table change

We are using a third party who's own implementation of caching has very poor performance rates when we measure making requests via their API and their database. Their database (Sql Sever 2005 - running in compat开发者_如何学运维iablity mode - so thinking it is actaully a 2000 db) uses the same principals that SqlCacheDependency does in the sense it has a table with two columns

  1. tablename
  2. changeCount

and the triggers on the tables which update this custom table which logs the change count.

We are thinking of throwing away the third party caching and implementing our own solution. using SqlCacheDependency with Asp.NET 3.5

Rather than going through the process of enabling the tables etc which creates the automated AspNet_SqlCacheTablesForChangeNotification with all the associated sp's, trigger etc, I would rather use the already existing data structure.

So my question is, is it possible to have SqlCacheDependency riged up so that rather than looking at the AspNet_SqlCacheTablesForChangeNotification and associated stored procs that it looks at the custom tables which are already defined in the db?


You could simply create those stored procedures with those name, but alter their implementation to work with your own data structure. I'm not sure you can tell the SqlCacheDependency what stored procedures to use, but because we do know what ones it wants to use, you could do a little slight of hand.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜