HttpCacheAgeControl Enumeration
Specifies the meaning of time values that control caching behavior for resources obtained using HttpWebRequest objects.
Assembly: System (in System.dll)
| Member name | Description | |
|---|---|---|
| None | For internal use only. The Framework will throw an ArgumentException if you try to use this member. | |
| MinFresh | Content can be taken from the cache if the time remaining before expiration is greater than or equal to the time specified with this value. | |
| MaxAge | Content can be taken from the cache until it is older than the age specified with this value. | |
| MaxStale | Content can be taken from the cache after it has expired, until the time specified with this value elapses. | |
| MaxAgeAndMinFresh | MaxAge and MinFresh. | |
| MaxAgeAndMaxStale | MaxAge and MaxStale. |
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::MinFreshAndMaxAge, ageMaximum, freshMinimum);
Console::WriteLine(policy);
return policy;
}
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.