acs::try_cache (private)

 acs::try_cache cache operation [ args... ]

Defined in packages/acs-tcl/tcl/acs-cache-procs.tcl

Function to support caching during bootstrap. When the provided cache exists, then use it for caching, otherwise perform uncalled call. This function is made intentionally private, since this should only be required during bootstrapping. It does not make sense to wrap arbitrary caching calls with this function.

Parameters:
cache (required)
operation (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_delete apm_package_delete (public) acs::try_cache acs::try_cache apm_package_delete->acs::try_cache apm_package_enabled_p apm_package_enabled_p (public) apm_package_enabled_p->acs::try_cache apm_package_install apm_package_install (public) apm_package_install->acs::try_cache apm_package_installed_p apm_package_installed_p (public) apm_package_installed_p->acs::try_cache apm_version_disable apm_version_disable (public) apm_version_disable->acs::try_cache

Testcases:
No testcase defined.
Source code:
        if {
            [namespace which $cache] ne "" &&
            [$cache info lookup methods $operation] ne ""
        } {
            return [uplevel 1 [list $cache $operation {*}$args]]
        } else {
            #
            # Complain only, when
            # a) not during initial install, and
            # b) if this is not during startup of an installed version
            #
            set complain_p [expr {[ns_ictl epoch] > 0 && [nsv_names acs_installer] eq ""}]
            if {$operation eq "eval"} {
                nsf::parseargs {{-partition_key} {-expires} {-per_request:switch} key command} $args
                if {$complain_p} {
                    ns_log warning "no cache $cache: need direct call $key $args"
                }
                #ns_log warning "no cache $cache: need direct call $key [info exists partition_key] <$command>"
                return [uplevel 1 $command]
            }
            if {$complain_p} {
                ns_log warning "no cache $cache: call ignored"
            }
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: