- date
- a TimeSpan
Max-age is the maximum absolute time a document is allowed to exist before being considered stale.
The HttpCachePolicy.SetMaxAge(TimeSpan) method does not use sliding expiration and will fail if the expiration date violates the principle of restrictiveness.
HttpCachePolicy.SetMaxAge(TimeSpan) is introduced in the .NET Framework version 3.5. For more information, see The .NET Framework 3.5 Architecture.
If the HttpCachePolicy.SetMaxAge(TimeSpan) method is called repeatedly, on the second and subsequent calls, the value of the maximum age can only be decreased.