acs::PartitionedCache method init (public)

 <instance of acs::PartitionedCache[i]> init

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

If the name was not provided, use the object name as default for the cache name.

Testcases:
No testcase defined.
Source code:
if {![info exists :name]} {
    set :name [namespace tail [current]]
}
set :partitions [::parameter::get_from_package_key  -package_key ${:package_key}  -parameter "${:parameter}Partitions"  -default ${:partitions}]
#
# Create multiple separate caches depending on the
# partitions. A PartitionedCache requires to have a
# partitioning function that determines the nth partition
# number from some partition_key.
#
set size [expr {[:get_size] / ${:partitions}}]
set :partition_names {}
for {set i 0} {$i < ${:partitions}} {incr i} {
    lappend :partition_names ${:name}-$i
    :cache_create ${:name}-$i $size
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: