nsmcp::CachedLogSearch method flush (public)

 <instance of nsmcp::CachedLogSearch[i]> flush

Defined in /usr/local/ns/tcl/nsmcp/log-summary.tcl

Discard cached search state for this log source. Serialize the update and clean up retained result resources owned by the source.

Returns:
The cache cleanup result.

Testcases:
No testcase defined.
Source code:
ns_mutex lock ${:mutex}
try {
    set key ${:cacheKey}:search
    if {[nsv_exists ${:store} $key]} {
        set meta [nsv_get ${:store} $key]
        :removeQueries [dict get $meta queries]
        dict set meta queries {}
        dict incr meta generation
        nsv_set ${:store} $key $meta
    }
} finally {
    ns_mutex unlock ${:mutex}
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: