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

AF SDK Getting Started

Lesson 1 hints and tips

  • Last UpdatedSep 29, 2022
  • 1 minute read

AF SDK maintains an internal cache for each PI AF identity. For example, if two users have exactly the same access to the PI AF database, then they would share the same cache. The cache is initialized when the first connection to the database is made. Internally, AF SDK allows connections to the PI AF server and PI Data Archive to drop after periods of inactivity and automatically reestablishes connection when activity is resumed. The user cache is preserved between periods of inactivity and can be reused after reconnecting. Calling Disconnect() explicitly, however, clears the user cache.

When using a PISystem or PIServer instance, OSIsoft does not recommend that you manually incorporate your own reconnect logic using Disconnect() and Connect(); doing so forces the cache to re-initialize upon reconnecting. In most of your projects with AF SDK, OSIsoft recommends using implicit connections and having AF SDK handle reconnecting.

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