IBitsPeerCacheAdministration::SetMaximumContentAge method (bits3_0.h)

Specifies when files are removed from the cache based on age.

Syntax

HRESULT SetMaximumContentAge(
  [in] ULONG Seconds
);

Parameters

[in] Seconds

Age, in seconds. If the last time that the file was accessed is older than this age, BITS removes the file from the cache. The age is reset each time the file is accessed. The maximum value is 10,368,000 seconds (120 days) and the minimum value is 86,400 seconds (1 day). The default is 7,776,000 seconds (90 days).

Return value

The method returns the following return values.

Return code Description
S_OK
Success
S_FALSE
The configuration preference has been saved successfully, but the preference will not be used because a configured Group Policy setting overrides the preference.

Remarks

This value is used only if the MaxContentAge group policy is not set.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header bits3_0.h (include Bits.h)
Library Bits.lib

See also

IBitsPeerCacheAdministration

IBitsPeerCacheAdministration::GetMaximumContentAge

IBitsPeerCacheAdministration::SetMaximumCacheSize