Skip to main content
Version: 8.3 Beta 🚧

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​

TypeParameterDescription
StringprojectThe project that contains the named query whose cache needs to be cleared. An error will be thrown if no local project is found.
StringpathThe 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()