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

AF SDK Reference

AFCache Class

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFCache Class
This class caches certain AF objects and collections to prevent them from untimely garbage collection.

Inheritance Hierarchy

SystemObject
  OSIsoft.AF.DiagnosticsAFCache

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

Syntax

public static class AFCache
Public NotInheritable Class AFCache

You do not need to declare an instance of a static class in order to access its members.
public ref class AFCache abstract sealed
[<AbstractClassAttribute>]
[<SealedAttribute>]
type AFCache =  class end

The AFCache type exposes the following members.

Properties

  NameDescription
Public propertyStatic member
CacheTime
The length of time, in seconds, that AF SDK objects will be kept in the cache, provided there is room based on the MaxObjects property.
Public propertyStatic member
MaxObjects
The maximum number of objects that the AF SDK will keep in its cache at any one time.

Methods

  NameDescription
Public methodStatic member
Clear
Removes all items from the AF SDK's cache. These items may still be accessed by the AF SDK up until the .NET garbage collector destroys them.

Remarks

The AF SDK will cache certain objects and collections for a short period of time to prevent them from being garbage collected too soon. You can use the properties and methods of this class to control how long and how many objects the AF SDK will cache. You can also request that the AF SDK empties its cache.

Version Information

AFSDK


See Also

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