lang::message::cache (public)

 lang::message::cache [ -force ]

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

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

Switches:
-force (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 test_test_catalog_import_export test_catalog_import_export (test acs-lang) lang::message::cache lang::message::cache test_test_catalog_import_export->lang::message::cache db_foreach db_foreach (public) lang::message::cache->db_foreach Class ::acs::Cluster Class ::acs::Cluster (public) Class ::acs::Cluster->lang::message::cache lang::catalog::import lang::catalog::import (public) 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

Testcases:
test_catalog_import_export
Source code:
    #
    # We segregate messages by language. It might reduce contention if
    # we segregate instead by package keys. Check mutex contention
    # nsstats (with ns_info locks).
    #
    if {[nsv_incr lang_message_cache executed_p] == 1 || $force_p} {

        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
        }

        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: