system.db.clearQueryCache
This function is used in Python Scripting.
Descriptionβ
This clears the caches for specified Named Queries in a project, or all Named Queries if no arguments are provided.
Client Permission Restrictionsβ
This scripting function has no Client Permission restrictions.
Syntaxβ
system.db.clearQueryCache(project, path)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | project | The project that contains the named query whose cache needs to be cleared. An error will be thrown if no local project is found. |
| String | path | The path to the named query whose cache needs to be cleared. |
Returnsβ
Nothing
Scopeβ
Gateway, Vision Client, Perspective Session
Code Examplesβ
Clear a Named Query Cache within a Project
projectName = "myProject"
namedQueryPath = "folder/selectFromInventory"
system.db.clearQueryCache(projectName, namedQueryPath)
Clear All Named Query Caches
# Clear all of the Named Query caches from the default project.
# Note that this includes caches generated from elsewhere on the Gateway.
system.db.clearQueryCache()