views:

103

answers:

0

I've been toying with the VirtualPathProvider the last couple of days and have gotten to the stage where I'm serving my aspx files from a SQL database but am stuck when it come to a method of invalidating the ASP.NET cache whenever a row on my database changes.

So far I've managed to get it working using the SQL2000 method of SqlCacheDependency but that only gives me table-level caching i.e. if a row in the Pages table is modified then all the pages that are cached get invalidated, causing ASP.NET to retrieve and recompile the pages again as they're requested.

My ideal is to get it working with the SQL2005 method of SqlCacheDependency where it's row-level and done through the Service Broker. Trouble is it looks like there's no straightforward way of doing it...

Has anyone successfully managed to implement this? If so did it involve creating a custom CacheDependency?

Cheers, Cain