Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

HttpWebRequest.DefaultCachePolicy Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the default cache policy for this request.

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

'Declaration
Public Shared Property DefaultCachePolicy As RequestCachePolicy
'Usage
Dim value As RequestCachePolicy

value = HttpWebRequest.DefaultCachePolicy

HttpWebRequest.DefaultCachePolicy = 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)

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 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.