Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFDataCache.CacheTimeSpan Property

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFDataCache.CacheTimeSpan Property
The minimum amount of time series data to be kept for each AFAttribute in the cache, as measured by time span.

Namespace:  OSIsoft.AF.Data
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public TimeSpan CacheTimeSpan { get; set; }
Public Property CacheTimeSpan As TimeSpan
	Get
	Set

Dim instance As AFDataCache
Dim value As TimeSpan

value = instance.CacheTimeSpan

instance.CacheTimeSpan = value
public:
property TimeSpan CacheTimeSpan {
	TimeSpan get ();
	void set (TimeSpan value);
}
member CacheTimeSpan : TimeSpan with get, set

Property Value

Type: TimeSpan
The minimum amount of time series data to be kept for each AFAttribute in the cache, as measured by time span. The default time span is 5 minutes.

Remarks

CacheTimeSpan, MinCacheEventsPerAttribute and MaxCacheEventsPerAttribute properties determine how the AFDataCache trims cache events. Events more than MaxCacheEventsPerAttribute are trimmed. Events in excess of MinCacheEventsPerAttribute and CacheTimeSpan are subject to trimming. The trimming properties apply to all AFAttributes in the same AFDataCache.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in