HostingEnvironmentSection.UrlMetadataSlidingExpiration Property

Definition

Gets or sets a value that determines how ASP.NET caches URL metadata.

C#
[System.ComponentModel.TypeConverter(typeof(System.Configuration.InfiniteTimeSpanConverter))]
[System.Configuration.ConfigurationProperty("urlMetadataSlidingExpiration", DefaultValue="00:01:00")]
[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]
public TimeSpan UrlMetadataSlidingExpiration { get; set; }

Property Value

A value that determines how ASP.NET caches URL metadata. The default value is 1 minute.

Attributes

Remarks

An example of URL metadata is information in the Web.config file about security restrictions that apply to a particular URL.

The following values have special meanings:

  • "Infinite". URL metadata is cached without a sliding expiration. This means caching continues until the server uses the maximum allotted amount of memory. This is the default behavior in ASP.NET 3.5 and earlier versions.

  • "00:00:00". URL metadata is not cached. The metadata is regenerated with every request. This is more efficient for scenarios where the same URL is rarely requested.

Applies to

Produkt Versionen
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1