db_flush_cache (public)
db_flush_cache [ -cache_key_pattern cache_key_pattern ] \ [ -cache_pool cache_pool ]
Defined in packages/acs-tcl/tcl/01-database-procs.tcl
Flush the given cache of entries with keys that match the given pattern.
- Switches:
- -cache_key_pattern (optional, defaults to
"*"
)- The "string match" pattern used to flush keys (default is to flush all entries)
- -cache_pool (optional, defaults to
"db_cache_pool"
)- The pool to flush (default is to flush db_cache_pool)
- Author:
- Don Baccus <dhogasa@pacifier.com>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- db__caching
Source code: # # If the key pattern has meta characters, iterate over the entries. # Otherwise, make a direct lookup, without retrieving the all keys # from the cache, which can cause large mutex lock times. # if {[regexp {[*\]\[]} $cache_key_pattern]} { if {[namespace which ns_cache_eval] ne ""} { # # NaviServer variant # ::acs::clusterwide ns_cache_flush -glob $cache_pool $cache_key_pattern } else { # # AOLserver variant # foreach key [ns_cache names $cache_pool $cache_key_pattern] { ns_cache flush $cache_pool $key } } } else { acs::clusterwide ns_cache flush $cache_pool $cache_key_pattern }XQL Not present: Generic, PostgreSQL, Oracle