acs::Cache method eval

 <instance of acs::Cache[i]> eval

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 test_xotcl-core xotcl-core (test ) acs::Cache instproc eval acs::Cache instproc eval test_xotcl-core->acs::Cache instproc eval test_xotcl_core_tutorial_2 xotcl_core_tutorial_2 (test ) test_xotcl_core_tutorial_2->acs::Cache instproc eval test_xowiki_test_cases xowiki_test_cases (test xowiki) test_xowiki_test_cases->acs::Cache instproc eval

Testcases:
xotcl_core_tutorial_2, xotcl-core, xowiki_test_cases
Source code:
if {![info exists partition_key]} {
    set partition_key $key
}
foreach optional_parameter {expires timeout} {
    if {[info exists $optional_parameter]} {
        set ${optional_parameter}_flag [list -$optional_parameter [set $optional_parameter]]
    } else {
        set ${optional_parameter}_flag ""
    }
}
set cache_name [:cache_name $partition_key]
try {
    if {$per_request} {
        acs::per_request_cache eval -key ::acs-${cache_name}($key) {
            :uplevel [list ns_cache_eval  {*}$expires_flag {*}$timeout_flag --  $cache_name $key $command]
        }
    } else {
        :uplevel [list ns_cache_eval {*}$expires_flag {*}$timeout_flag --  $cache_name $key $command]
    }

} on break {r} {
    #
    # When the command ends with "break", it means:
    # "don't cache". We return in this case always a
    # 0.
    #
    #ns_log notice "====================== [self] $key -> break -> <$r>"
    return 0

} on ok {r} {
    return $r
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: