WebResponse.IsFromCache Property

Gets a Boolean value that indicates whether this response was obtained from the cache.

Namespace: System.Net
Assembly: System (in system.dll)

public virtual bool IsFromCache { get; }
/** @property */
public boolean get_IsFromCache ()

public function get IsFromCache () : boolean

Not applicable.

Property Value

true if the response was taken from the cache; otherwise, false.

The current cache policy and the presence of the requested resource in the cache determine whether a response can be retrieved from the cache. Using cached responses usually improves application performance, but there is a risk that the response in the cache does not match the response on the server. Use the CachePolicy property to set and the RequestCachePolicy class to enumerate the current caching policy.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions