lang::message::cache (private)

 lang::message::cache

Defined in packages/acs-lang/tcl/lang-message-procs.tcl

Loads the entire message catalog from the database into the cache.

Partial Call Graph (max 5 caller/called nodes):
%3 lang::catalog::import lang::catalog::import (public) lang::message::cache lang::message::cache lang::catalog::import->lang::message::cache lang::message::lookup lang::message::lookup (public) lang::message::lookup->lang::message::cache lang::message::message_exists_p lang::message::message_exists_p (public) lang::message::message_exists_p->lang::message::cache packages/acs-admin/www/apm/version-i18n-process-2.tcl packages/acs-admin/ www/apm/version-i18n-process-2.tcl packages/acs-admin/www/apm/version-i18n-process-2.tcl->lang::message::cache packages/acs-lang/tcl/acs-lang-init.tcl packages/acs-lang/ tcl/acs-lang-init.tcl packages/acs-lang/tcl/acs-lang-init.tcl->lang::message::cache db_foreach db_foreach (public) lang::message::cache->db_foreach db_release_unused_handles db_release_unused_handles (public) lang::message::cache->db_release_unused_handles

Testcases:
No testcase defined.
Source code:
    # We segregate messages by language. It might reduce contention
    # if we segregate instead by package. Check for problems with ns_info locks.

    if {[nsv_incr lang_message_cache executed_p] == 1} {

        set i 0
        db_foreach select_locale_keys {
            select locale, package_key, message_key, message
            from   lang_messages
            where deleted_p = 'f'
        } {
            nsv_set lang_message_$locale "${package_key}.${message_key}" $message
            incr i
        }

        db_release_unused_handles

        ns_log Notice "lang::message::cache - Initialized message cache with $i rows from database"
    }
Generic XQL file:
packages/acs-lang/tcl/lang-message-procs.xql

PostgreSQL XQL file:
packages/acs-lang/tcl/lang-message-procs-postgresql.xql

Oracle XQL file:
packages/acs-lang/tcl/lang-message-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: