CacheControlHeaderValue::MaxAge Property

.NET Framework (current version)
 

The maximum age, specified in seconds, that the HTTP client is willing to accept a response.

Namespace:   System.Net.Http.Headers
Assembly:  System.Net.Http (in System.Net.Http.dll)

public:
property Nullable<TimeSpan> MaxAge {
	Nullable<TimeSpan> get();
	void set(Nullable<TimeSpan> value);
}

Property Value

Type: System::Nullable<TimeSpan>

The time in seconds.

This property represents the "max-age" directive in a cache-control header field on an HTTP request or HTTP response.

Unless the MaxStale property is also set, the client is not willing to accept a stale response.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: