Delen via


HttpCacheReadBehavior Enum

Definition

Indicates if read requests by class methods in the Windows.Web.Http and Windows.Web.Http.Filters namespaces use the local HTTP cache for the response.

public enum class HttpCacheReadBehavior
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class HttpCacheReadBehavior
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum HttpCacheReadBehavior
var value = Windows.Web.Http.Filters.HttpCacheReadBehavior.default
Public Enum HttpCacheReadBehavior
Inheritance
HttpCacheReadBehavior
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Name Value Description
Default 0

Always use the cache algorithm specified in RFC 2616 by the IETF to optimize network bandwidth.

MostRecent 1

Use the local HTTP cache if possible but always ask the server if more recent content is available.

The server returns an HTTP status code of 200 (OK) or 304 (Not Modified) when the local content is the most recent.

OnlyFromCache 2

Only use data from the local HTTP cache. This is the offline behavior.

NoCache 3

Do not use cache nor do a conditional request. This ensures that all HTTP requests go directly to the server.

Remarks

Version history

Windows version SDK version Value added
1607 14393 NoCache

Applies to

See also