HttpWebRequest.DefaultCachePolicy Property

Gets or sets the default cache policy for this request.

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

static property RequestCachePolicy^ DefaultCachePolicy {
	RequestCachePolicy^ get ();
	void set (RequestCachePolicy^ value);
/** @property */
public static RequestCachePolicy get_DefaultCachePolicy ()

/** @property */
public static void set_DefaultCachePolicy (RequestCachePolicy value)

public static function get DefaultCachePolicy () : RequestCachePolicy

public static function set DefaultCachePolicy (value : RequestCachePolicy)

Not applicable.

Property Value

A HttpRequestCachePolicy that specifies the cache policy in effect for this request when no other policy is applicable.

Setting this property registers the specified policy for the HTTP and HTTPS schemes. This policy is used for this request if:

There is no P:System.Net.HttpWebRequest.CachePolicy property specified for this request.

- or -

The machine and application configuration files do not specify a cache policy that is applicable to the Uniform Resource Identifier (URI) used to create this request.

The cache policy determines whether the requested resource can be taken from a cache instead of sending the request to the resource host computer.

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