Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


This feature is new in Ignition version 7.9.6
Click here to check out the other new features

Description

This clears the caches of all named queries in this project.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.db. clearAllNamedQueryCaches()

  • Parameters

none

  • Returns

No Return Value

  • Scope

All

Code Examples
Simple Example
# Calling this simply clears all Named Query Caches. 
system.db.clearAllNamedQueryCaches()
Example - Clear Custom NQ Calls
# If multiple Named Queries with varying parameters are called in a single script, then clearAllNamedQueryCaches can be used to free up the memory used by all of the newly created caches. 

# This creates one cache
params = {"param1":"A"}
system.db.runNamedQuery("myUpdateQuery", params)

# This creates a separate cache
params = {"param1":"B"}
system.db.runNamedQuery("anotherUpdateQuery", params)

# Clear all of the caches from the current project. Note that all caches are cleared, including those generated from elsewhere on the Gateway. 
system.db.clearAllNamedQueryCaches()
  • No labels