ad_parameter_cache (public)

 ad_parameter_cache [ -set set ] [ -delete ] [ -global ] key \

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

Manages the cache for ad_parameter.

Use this flag to indicate a value to set in the cache.
(boolean) (optional)
Delete the value from the cache
(boolean) (optional)
If true, global param, false, instance param
key - Specifies the key for the cache'd parameter, either the package instance id (instance parameter) or package key (global parameter).
parameter_name - Specifies the parameter name that is being cached.
The cached value.

Partial Call Graph (max 5 caller/called nodes):
%3 test_auth_email_on_password_change auth_email_on_password_change (test acs-authentication) ad_parameter_cache ad_parameter_cache test_auth_email_on_password_change->ad_parameter_cache test_auth_password_change auth_password_change (test acs-authentication) test_auth_password_change->ad_parameter_cache test_auth_use_email_for_login_p auth_use_email_for_login_p (test acs-authentication) test_auth_use_email_for_login_p->ad_parameter_cache test_parameter__check_procs parameter__check_procs (test acs-tcl) test_parameter__check_procs->ad_parameter_cache acs::clusterwide acs::clusterwide ad_parameter_cache->acs::clusterwide db_string db_string (public) ad_parameter_cache->db_string acs_admin::check_expired_certificates acs_admin::check_expired_certificates (private) acs_admin::check_expired_certificates->ad_parameter_cache ad_parameter_cache_all ad_parameter_cache_all (private) ad_parameter_cache_all->ad_parameter_cache apm_parameter_sync apm_parameter_sync (public) apm_parameter_sync->ad_parameter_cache apm_parameter_unregister apm_parameter_unregister (public) apm_parameter_unregister->ad_parameter_cache parameter::get parameter::get (public) parameter::get->ad_parameter_cache

auth_password_change, auth_use_email_for_login_p, auth_email_on_password_change, parameter__check_procs
Source code:
        if {$delete_p} {
            if {[nsv_dict exists ad_param $key $parameter_name]} {
                ::acs::clusterwide nsv_dict unset ad_param $key $parameter_name
            acs::per_request_cache flush -pattern acs-tcl.ad_param-$key
        if {[info exists set]} {
            nsv_dict set ad_param $key $parameter_name $set
            acs::per_request_cache flush -pattern acs-tcl.ad_param-$key
            return $set
        # Keep the parameter dict in a per-request cache to reduce
        # potentially high number of nsv locks, when parameters of a
        # package are queried a high number of times per request
        # (without this we see on some sites > 100 locks on this nsv
        # per request).
        set dict [acs::per_request_cache eval -no_cache "" -key acs-tcl.ad_param-$key {
            if {[nsv_get ad_param $key result]} {
                #ns_log notice "ad_parameter_cache $key $parameter_name not cached"
                set result
            } else {
                set result ""
        if {[dict exists $dict $parameter_name]} {
            #ns_log notice "ad_parameter_cache $key $parameter_name get from dict"
            return [dict get $dict $parameter_name]
        if { $global_p } {
            set value [db_string select_global_parameter_value {
                select apm_parameter_values.attr_value
                from   apm_parameters, apm_parameter_values
                where  apm_parameter_values.package_id is null
                and    apm_parameter_values.parameter_id = apm_parameters.parameter_id
                and    apm_parameters.parameter_name = :parameter_name
                and    apm_parameters.package_key = :key
            } -default ""]
        } else {
            set value [db_string select_instance_parameter_value {
                select apm_parameter_values.attr_value
                from   apm_parameters, apm_parameter_values
                where  apm_parameter_values.package_id = :key
                and    apm_parameter_values.parameter_id = apm_parameters.parameter_id
                and    apm_parameters.parameter_name = :parameter_name
            } -default ""]
        nsv_dict set ad_param $key $parameter_name $value
        return $value
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: