October 2010
Intermediate to advanced
1920 pages
73h 55m
English
You can use Push SQL cache dependencies when caching an entire ASP.NET page. If the results of any SQL command contained in the page changes, the page is dropped automatically from the cache.
The SqlCommand object includes a property named the NotificationAutoEnlist property. This property has the value True by default. When NotificationAutoEnlist is enabled, a Push cache dependency is created between the page and the command automatically.
For example, the page in Listing 29.46 includes an <%@ OutputCache %> directive that includes a SqlDependency attribute. This attribute is set to the special value CommandNotification.
Listing 29.46. PushSQLOutputCache.aspx
The page in Listing 29.46 ...
Read now
Unlock full access