Export (0) Print
Expand All

HttpRequestCachePolicy.MinFresh Property

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

Gets the minimum freshness that is permitted for a resource returned from the cache.

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

public TimeSpan MinFresh { get; }
/** @property */
public TimeSpan get_MinFresh ()

public function get MinFresh () : TimeSpan

Property Value

A TimeSpan value that specifies the minimum freshness specified when this instance was created. If no date was specified, this property's value is MinValue.

This value specifies the amount of time before content expiration, during which the cached copy of the resource is acceptable. The value for this property is specified when the instance is constructed.

The following code example demonstrates displaying the value of this property.

public static HttpRequestCachePolicy CreateMinFreshPolicy(TimeSpan span)
{
    HttpRequestCachePolicy policy = 
        new HttpRequestCachePolicy(HttpCacheAgeControl.MinFresh, span); 
    Console.WriteLine("Minimum freshness {0}", policy.MinFresh.ToString());
    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

ADD
Show:
© 2014 Microsoft