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
(defaults to "*") (optional)
The "string match" pattern used to flush keys (default is to flush all entries)
-cache_pool
(defaults to "db_cache_pool") (optional)
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):
%3 test_db__caching db__caching (test acs-tcl) db_flush_cache db_flush_cache test_db__caching->db_flush_cache acs::clusterwide acs::clusterwide db_flush_cache->acs::clusterwide acs_mail_lite::section_id_of acs_mail_lite::section_id_of (private) acs_mail_lite::section_id_of->db_flush_cache application_group::delete application_group::delete (public) application_group::delete->db_flush_cache packages/acs-lang/www/admin/locale-edit.tcl packages/acs-lang/ www/admin/locale-edit.tcl packages/acs-lang/www/admin/locale-edit.tcl->db_flush_cache

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
[ hide source ] | [ make this the default ]
Show another procedure: