add Element for profiles for caching [IIS Settings Schema]
Note
For more information about the add element, see the following topic on the Microsoft IIS.net Web site: Adding Caching Profiles <add>.
Adds an output caching profile to the collection of output caching profiles.
Syntax
Attributes and Elements
The following sections describe attributes, child elements, and parent elements for this section.
Attributes
Attribute |
Description |
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
duration |
Optional timeSpan attribute. Specifies the time (in seconds) that the page or user control is cached The default is 00:00:30. |
||||||||||||||
extension |
Required string attribute. Specifies the file type extension for the files you want to cache. |
||||||||||||||
kernelCachePolicy |
Optional enum attribute. Configures the kernel caching policy. The kernelCachePolicy attribute can be one of the following values. The default is DontCache.
|
||||||||||||||
location |
Optional enum attribute. Specifies the valid values for controlling the location of the output-cached HTTP response for a resource. The location attribute can be one of the following possible values. The default is Server.
|
||||||||||||||
policy |
Optional enum attribute. Configures the output caching policy. The policy attribute can be one of the following possible values. The default is DontCache.
|
||||||||||||||
varyByHeaders |
Optional string attribute. Specifies a semicolon-separated list of HTTP headers used to vary the output cache. When this attribute is set to multiple headers, the output cache contains a different version of the requested document for each combination of specified headers. |
||||||||||||||
varyByQueryString |
Optional string attribute. Specifies a semicolon-separated list of strings used to vary the output cache. By default, these strings correspond to a query string value sent with GET method attributes, or a parameter sent by using the POST method. When this attribute is set to multiple parameters, the output cache contains a different version of the requested document for each combination of specified parameters. Possible values include none, an asterisk (*), and any valid query string or POST parameter name. |
Child Elements
None
Parent Elements
Element |
Description |
---|---|
configuration |
Specifies the root element in every configuration file that is used by IIS 7. |
system.webServer |
Specifies the top-level section group (in ApplicationHost.config) in which this element is defined. |
caching |
Configures output cache settings. |
profiles |
Configures the profile to use for output caching. |
Remarks
For more information about the add element, see the following topic on the Microsoft IIS.net Web site: Adding Caching Profiles <add>.
Element Information
Configuration locations |
Machine.config ApplicationHost.config Root application Web.config Application Web.config Directory Web.config |
Requirements |
Microsoft Internet Information Services (IIS) version 7.0 |
See Also
Reference
clear Element for profiles for caching [IIS Settings Schema]
remove Element for profiles for caching [IIS Settings Schema]