HttpCacheStoreLimits Class

Bounds the content of a cache store. When a write exceeds a bound, the store evicts the least recently used entries.

public sealed class HttpCacheStoreLimits

Remarks

An entry is one stored response: a URL with several variants (see the Vary header) has one entry per variant. Reading the entries of a URL and writing an entry make them the most recently used.

The size of an entry is the length of its HttpCachePersistenceEntry.SerializedResponse, which holds the headers and the body of the response. The metadata of the entry and the overhead of the store are not counted.

Constructors

NameDescription
HttpCacheStoreLimits()

HttpCacheStoreLimits()

public HttpCacheStoreLimits()

No documentation is available.

Properties

NameDescription
MaximumEntryCountGets or sets the maximum number of entries the store keeps, or null for no limit. Default is null.
MaximumTotalSizeGets or sets the maximum total size, in bytes, of the entries the store keeps, or null for no limit. Default is null. An entry larger than this value is not kept.

MaximumEntryCount

HttpCacheStoreLimits.cs

Gets or sets the maximum number of entries the store keeps, or null for no limit. Default is null.

public long? MaximumEntryCount { get; set; }

Property value

long?

Exceptions

ArgumentOutOfRangeException
The value is zero or negative.

MaximumTotalSize

HttpCacheStoreLimits.cs

Gets or sets the maximum total size, in bytes, of the entries the store keeps, or null for no limit. Default is null. An entry larger than this value is not kept.

public long? MaximumTotalSize { get; set; }

Property value

long?

Exceptions

ArgumentOutOfRangeException
The value is zero or negative.