# If the same Named Queried is called multiple times with different parameters in a single script, then we can clear the caches once we're done with the following.
# This example assumes the script is running in the Project Scope. If called from the Shared Scope, the name of the project would need to be included.
namedQueryPath = "myUpdateQuery"
# This creates one cache.
params = {"param1":"A"}
system.db.runNamedQuery(namedQueryPath, params)
# This creates a separate cache.
params = {"param1":"B"}
system.db.runNamedQuery(namedQueryPath, params)
# Clear all of the caches from the specified Named Query. Note that all caches are cleared, including those generated from elsewhere on the Gateway.
system.db.clearNamedQueryCache(namedQueryPath)