CacheDependency::HasChanged Property
.NET Framework (current version)
Gets a value indicating whether the CacheDependency object has changed.
Assembly: System.Web (in System.Web.dll)
Property Value
Type: System::Booleantrue if the CacheDependency object has changed; otherwise, false. The default is false.
You can add an item to an ASP.NET application's Cache with a CacheDependency. When the CacheDependency changes, the item added to the Cache is invalidated and removed from the cache. You can use this property to determine whether a CacheDependency has changed, and recreate the item in the Cache if that has occurred.
The following code example demonstrates using the HasChanged property to determine whether a CacheDependency changed since the previous request for an item in the Cache. The dt value passed in the start parameter is set to DateTime::Now.
.NET Framework
Available since 1.1
Available since 1.1
Show: