Class ::acs::HashKeyPartitionedCache (public)
::nx::Class ::acs::HashKeyPartitionedCache
Defined in packages/acs-tcl/tcl/acs-cache-procs.tcl
Partitioned cache, where the partition numbers are computed via a hash function. Key-partitioning is based on a modulo function using a special partition_key, which has to be numeric
- Testcases:
- No testcase defined.
Source code: :property {partitions:integer 2} :public method flush_pattern {{-partition_key:required} pattern} { # # flush just in all partitions # :flush_pattern_in_all_partitions $pattern } :public method set {{-partition_key:required} key value} { # # Set a single value in the cache. It transforms the # partition key into a hash value. This code uses # ns_cache_eval to achieve this behavior, which is # typically an AOLserver idiom and should be avoided. # next [list -partition_key [ns_hash $partition_key] $pattern] } :protected method cache_name {key} { next [list [ns_hash $key]] }XQL Not present: Generic, PostgreSQL, Oracle