category::reset_translation_cache (public)

 category::reset_translation_cache

Defined in packages/categories/tcl/categories-procs.tcl

Reloads all category translations in the cache.

Author:
Timo Hentschel <timo@timohentschel.de>

Partial Call Graph (max 5 caller/called nodes):
%3 test_category_init_procs category_init_procs (test categories) category::reset_translation_cache category::reset_translation_cache test_category_init_procs->category::reset_translation_cache db_foreach db_foreach (public) category::reset_translation_cache->db_foreach category_tree::copy category_tree::copy (public) category_tree::copy->category::reset_translation_cache category_tree::delete category_tree::delete (public) category_tree::delete->category::reset_translation_cache packages/categories/tcl/categories-init.tcl packages/categories/ tcl/categories-init.tcl packages/categories/tcl/categories-init.tcl->category::reset_translation_cache

Testcases:
category_init_procs
Source code:
    if {[nsv_names categories] ne ""} {
        nsv_unset categories
    }

    set category_id_old 0
    set tree_id_old 0
    db_foreach reset_translation_cache {
        select t.category_id, c.tree_id, t.locale, t.name
        from category_translations t, categories c
        where t.category_id = c.category_id
        order by t.category_id, t.locale
    } {
        if {$category_id != $category_id_old && $category_id_old != 0} {
            nsv_set categories $category_id_old [list $tree_id_old [array get cat_lang]]
            unset cat_lang
        }
        set category_id_old $category_id
        set tree_id_old $tree_id
        set cat_lang($locale$name
    }
    if {$category_id_old != 0} {
        nsv_set categories $category_id [list $tree_id [array get cat_lang]]
    }
XQL Not present:
Generic
PostgreSQL XQL file:
packages/categories/tcl/categories-procs-postgresql.xql

Oracle XQL file:
packages/categories/tcl/categories-procs-oracle.xql

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