System.Web.UI.ControlCachePolicy.SetSlidingExpiration Method

Instructs the System.Web.UI.BasePartialCachingControl control that wraps the user control to set the user control's cache entry to use sliding or absolute expiration.

Syntax

public void SetSlidingExpiration (bool useSlidingExpiration)

Parameters

useSlidingExpiration
true to use sliding cache expiration instead of absolute expiration; otherwise, false.

Remarks

Use the ControlCachePolicy.SetExpires(DateTime) and ControlCachePolicy.SetSlidingExpiration(bool) methods (passing true) to instruct the System.Web.UI.BasePartialCachingControl control that wraps the user control to use a sliding expiration caching policy instead of an absolute expiration policy. Use the ControlCachePolicy.SetExpires(DateTime) method and the ControlCachePolicy.SetSlidingExpiration(bool) method (passing false) to specify an absolute expiration policy.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0