SqlCacheDependency.CreateOutputCacheDependency(String) Method

Definition

Creates a dependency relationship between an item that is stored in an ASP.NET application's OutputCache object and a SQL Server database table.

C#
public static System.Web.Caching.CacheDependency CreateOutputCacheDependency(string dependency);

Parameters

dependency
String

The output-cache dependency directive.

Returns

The new dependency object.

Remarks

The following markup shows a typical output-cache dependency directive.

<%@ OutputCache Duration="3600" SqlDependency="Northwind:Employees" VaryByParam="none" %>

Applies to

Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1