I developed a cache provider that is basically an extension to the SysCache cache provider with support for SqlCacheDependencies. It can handle sql 2000 or sql 2005 style sql dependencies. Dependencies can be combined for aggregate dependencies. It also supports time of day expiration for those items that need to expire at a specific time of day maybe because of a nightly process. I would like to offer it to anybody that is interested. I would also give the code the NHibernate guys if they want to integrate it into the project.
The configuration for a cache region would be somtheing similiar to this:
Code:
<sysCache>
<cacheRegion name="Product" timeOfDayExpiration="11:10:00" priority="High" />
<cacheRegion name="Videos">
<dependencies>
<commands>
<add name="price"
command="Select Price from dbo.VideoTitle"
/>
</commands>
</dependencies>
</cacheRegion>
<cacheRegion name="Availability">
<dependencies>
<commands>
<add name="quantity"
command="Select SettingsId from dbo.VideoTitleAvailabilitySettings"
connectionName="default"
</commands>
</dependencies>
</cacheRegion>
<!--Or Table Based dependency for Sql 2000-->
<cacheRegion name="Availability">
<dependencies>
<tables>
<add name="quantity"
databaseEntryName="Default"
tableName="VideoTitleAvailabilitySettings" />
</tables>
</dependencies>
</cacheRegion>
</sysCache>
Just give me an email address and I'll send the code.