I plan to use output cache for my page and also specify sql dependency
i succeded in doing it the following way
Public class PresentationController: Controller
[Output cache (duration=1000, VaryByParam="*", sqldependency="contentdb: TblMetadata"]
Public ActionResult index ()
// contact db and display results
Suppose if i want to implement a dependency on the sql query , i create an sqlcache dependency object and specify the sql command to it.Set the notifications .But how do i add this sqldependency to the output cache?
For example: if i need to add a file dependency, i give something like Response.AddFileDependency ("filepath"); is there any similiar command available for sqldependency as well?
I'm confused about this because, most of the examples i've looked into, does a cache.insert , which defeats my purpose as it's object caching and not output caching.
In a nutshell, is it possible to attach a sqlcachedependency to o/p cache inside the controller action
View Complete Post