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

AF SDK Reference

IAFSearch(T).CacheTimeout Property

  • Last UpdatedNov 18, 2025
  • 2 minute read
IAFSearch(T).CacheTimeout Property
The timeout to clean up the cached search in the server if it has not been used.

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

Syntax

TimeSpan CacheTimeout { get; set; }
Property CacheTimeout As TimeSpan
	Get
	Set

Dim instance As IAFSearch
Dim value As TimeSpan

value = instance.CacheTimeout

instance.CacheTimeout = value
property TimeSpan CacheTimeout {
	TimeSpan get ();
	void set (TimeSpan value);
}
abstract CacheTimeout : TimeSpan with get, set

Property Value

Type: TimeSpan
Returns the timeout to clean up the cached search in the server if it has not been used. Specify a value of TimeSpan.Zero to disable the caching of the search results. The default value is TimeSpan.Zero.

Remarks

This property controls whether the search cache is enabled. If the interval is non-zero (cache is enabled), then this setting controls how long the cached search is kept in the server. If the cached search has not been used in the specified timeout period, then it will be removed from the server. Negative values are handled the same as a zero timespan.

If you will only be getting items from the first page, then it is best to leave the cache disabled. If you will be paging through several pages of items, then it is best to enable the cache by setting this property to a value larger than you expect to be using the search.

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

See Also

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