AFAdmin.RebuildPathCache Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Rebuilds the path cache to each element in the PI AF SQL Server database.
Namespace: OSIsoft.AF.Diagnostics
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static void RebuildPathCache( PISystem system )
Public Shared Sub RebuildPathCache ( system As PISystem ) Dim system As PISystem AFAdmin.RebuildPathCache(system)
public: static void RebuildPathCache( PISystem^ system )
static member RebuildPathCache : system : PISystem -> unit
Parameters
- system
- Type: OSIsoft.AFPISystem
The operation will be performed on the specified PISystem.
Exceptions
| Exception | Condition |
|---|---|
| SecurityException | This exception is thrown when attempting to execute without Admin security rights. |
| ArgumentNullException | This exception is thrown when attempting to execute on a PISystem that is null or deleted. |
| NotSupportedException | This exception is thrown when attempting to execute on a PISystem that does not support the AdminFunctionality feature. |
Remarks
This method will Rebuilds the path cache to each element in the PI AF SQL Server database. The path cache can become outdated after significant data insertions, edits, and/or deletions. Rebuilding the path cache can improve the PI AF server’s performance.
Use the PISystem.Supports method to check if the PISystem supports the AdminFunctionality feature.
| Requires the Admin right to execute. |
| This method will error on servers before AF 2018 R2 (2.10.5). |