Export (0) Print
Expand All
Expand Minimize

RequestCachingSection Class [IIS 7 and higher]

IIS 7.0

Contains configuration information for request caching.

class RequestCachingSection : ConfigurationSection

The following table lists the methods exposed by the RequestCachingSection class.

Name

Description

GetAllowDefinition

(Inherited from ConfigurationSection.)

GetAllowLocation

(Inherited from ConfigurationSection.)

RevertToParent

(Inherited from ConfigurationSection.)

SetAllowDefinition

(Inherited from ConfigurationSection.)

SetAllowLocation

(Inherited from ConfigurationSection.)

The following table lists the properties exposed by the RequestCachingSection class.

Name

Description

DefaultFtpCachePolicy

An FtpCachePolicySettings value that specifies the default FTP caching behavior for the local computer.

DefaultHttpCachePolicy

An HttpCachePolicySettings value that specifies the default HTTP caching behavior for the local computer.

DefaultPolicyLevel

A read/write sint32 value that specifies the default cache policy level. The possible values are listed later in the Remarks section.

DisableAllCaching

A read/write boolean value. true if caching is disabled on the local computer; otherwise, false.

NoteNote:
If this configuration attribute is set to true in any configuration file, caching is disabled globally, and all other cache-related settings are ignored.

IsPrivateCache

A read/write boolean value. true if the local computer cache is private (that is, provides user isolation); otherwise, false.

NoteNote:
On client computers, this value is typically set to true, which indicates that one user cannot use resources cached by another user. For middle-tier applications, this value is typically set to false.

Location

(Inherited from ConfigurationSection.) A key property.

Path

(Inherited from ConfigurationSection.) A key property.

SectionInformation

(Inherited from ConfigurationSection.)

UnspecifiedMaximumAge

A read/write datetime value that specifies the default maximum age for cached resources that do not have expiration information. The default is 1 day. Setting this property ensures that a resource that does not have expiration header information does not remain fresh in the cache indefinitely.

This class contains no subclasses.

The following table lists the possible values for the DefaultPolicyLevel property. The default is 1 (BypassCache).

Value

Keyword

Description

0

Default

Satisfies a request for a resource either by using the cached copy of the resource or by sending a request for the resource to the server. The action taken is determined by the current cache policy and the age of the content in the cache. Most applications should use this cache level. 

1

BypassCache

Satisfies a request by using the server. No entries are taken from caches, added to caches, or removed from caches between the client and server. This is the default cache behavior specified in the computer configuration file that is included with the .NET Framework. 

2

CacheOnly

Satisfies a request by using the locally cached resource; does not send a request for an item that is not in the cache. When this cache policy level is specified, a WebException exception is thrown if the item is not in the client cache. 

3

CacheIfAvailable

Satisfies a request for a resource from the cache if the resource is available; otherwise, sends a request for a resource to the server. If the requested item is not available in the local cache, but it is available in a cache between the client and the server, the intermediate cache satisfies the request. 

4

Revalidate

Satisfies a request by using the cached copy of the resource if the time stamp is the same as the time stamp of the resource on the server; otherwise, the resource is downloaded from the server, presented to the caller, and stored in the cache. 

5

Reload

Satisfies a request by using the server. The response might be saved in the cache, depending on the settings of the no-cache cache control directive and the Pragma: no-cache header in the HTTP caching protocol. 

6

NoCacheNoStore

Never satisfies a request by using resources from the cache, and does not cache resources. If the resource is present in the local cache, it is removed. This policy level indicates to intermediate caches that they should remove the resource. In the HTTP caching protocol, this is achieved by using the no-cache cache control directive. 

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

Community Additions

ADD
Show:
© 2014 Microsoft