How to delete the query cache programmatically
InterSystems FAQ rubric
Query cache can be purged programmatically using the Purge* methods of the %SYSTEM.SQL class.
*For details of each method, please refer to the following documents.
① When deleting all query caches in the system
Do $SYSTEM.SQL.PurgeAllNamespaces()
② When deleting the query cache in the namespace
// delete all cached queries in namespace
Do $SYSTEM.SQL.Purge()
// when deleting the query cache specified by date
// the following deletes the cache not used in the last 30 days
Do $SYSTEM.SQL.Purge(30)
③ When specifying and deleting the query cache
Do $SYSTEM.SQL.PurgeCQClass("%sqlcq.USER.cls13")
④ When deleting the query cache for a specific table
Do $SYSTEM.SQL.PurgeForTable("MedLab.Patient")
Discussion (0)0