HttpCacheAgeControl Enumeration

Note: This enumeration is new in the .NET Framework version 2.0.

Specifies the meaning of time values that control caching behavior for resources obtained using HttpWebRequest objects.

Namespace: System.Net.Cache
Assembly: System (in system.dll)

public enum HttpCacheAgeControl
public enum HttpCacheAgeControl
public enum HttpCacheAgeControl

 Member nameDescription
MaxAgeContent can be taken from the cache until it is older than the age specified with this value. 
MaxAgeAndMaxStaleMaxAge and MaxStale
MaxAgeAndMinFreshMaxAge and MinFresh
MaxStaleContent can be taken from the cache after it has expired, until the time specified with this value elapses. 
MinFreshContent can be taken from the cache if the time remaining before expiration is greater than or equal to the time specified with this value. 
NoneFor internal use only. The Framework will throw an ArgumentException if you try to use this member. 

This enumeration is used by members of the HttpRequestCachePolicy class to configure the time values for cache policies.

The following code example creates a policy based on MaxAgeAndMinFresh.

public static HttpRequestCachePolicy CreateFreshAndAgePolicy(TimeSpan freshMinimum, TimeSpan ageMaximum)
    HttpRequestCachePolicy policy = 
        new HttpRequestCachePolicy(HttpCacheAgeControl.MaxAgeAndMinFresh, ageMaximum, freshMinimum); 
    return policy; 

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions