apm_parameter_sync (public)

 apm_parameter_sync package_key package_id

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

Syncs the parameters in the database with the memory cache. This must be called after creating a new package instance.

Parameters:
package_key (required)
package_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm::convert_type apm::convert_type (public) apm_parameter_sync apm_parameter_sync apm::convert_type->apm_parameter_sync apm_package_instance_new apm_package_instance_new (public) apm_package_instance_new->apm_parameter_sync packages/edit-this-page/www/etp-setup.tcl packages/edit-this-page/ www/etp-setup.tcl packages/edit-this-page/www/etp-setup.tcl->apm_parameter_sync packages/edit-this-page/www/etp-subtopic-create.tcl packages/edit-this-page/ www/etp-subtopic-create.tcl packages/edit-this-page/www/etp-subtopic-create.tcl->apm_parameter_sync ad_parameter_cache ad_parameter_cache (public) apm_parameter_sync->ad_parameter_cache db_list_of_lists db_list_of_lists (public) apm_parameter_sync->db_list_of_lists

Testcases:
No testcase defined.
Source code:

    # Get all the parameter names and values for this package_id.
    set names_and_values [db_list_of_lists apm_parameter_names_and_values {
        select parameter_name, attr_value
        from apm_parameters p, apm_parameter_values v, apm_packages a
        where p.parameter_id = v.parameter_id
        and a.package_id = v.package_id
        and a.package_id = :package_id
    }]

    # Put it in the cache.
    foreach name_value_pair $names_and_values {
        ad_parameter_cache -set [lindex $name_value_pair 1] $package_id [lindex $name_value_pair 0]
    }
Generic XQL file:
<fullquery name="apm_parameter_sync.apm_parameter_names_and_values">
    <querytext>
      select parameter_name, attr_value
      from apm_parameters p, apm_parameter_values v, apm_packages a
      where p.scope = 'instance'
      and p.parameter_id = v.parameter_id
      and a.package_id = v.package_id
      and a.package_id = :package_id
    </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-procs-postgresql.xql

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

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