Lesson 1: Hints and tips
- Last UpdatedJan 15, 2026
- 1 minute read
- PI System
- AF SDK 3.2.0
- PI Server
The 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, the users will share the same cache. The cache is initialized when the first connection to the database is made. Internally, the AF SDK allows connections to the PI AF server and 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.
Tip: When using a PISystem or PIServer instance, do not use Disconnect() and Connect()to manually incorporate your own reconnect logic using; doing so forces the cache to re-initialize upon reconnecting. In most of your projects with the AF SDK, AVEVA recommends using implicit connections and having the AF SDK handle reconnecting.