%3 ::acs::HashKeyPartitionedCache ::acs::HashKeyPartitionedCache cache_name flush_pattern set ::acs::KeyPartitionedCache ::acs::KeyPartitionedCache flush_pattern set ::acs::HashKeyPartitionedCache->::acs::KeyPartitionedCache ::acs::PartitionedCache ::acs::PartitionedCache cache_name flush_all flush_pattern_in_all_partitions init show_all ::acs::KeyPartitionedCache->::acs::PartitionedCache ::acs::Cache ::acs::Cache ::acs::PartitionedCache->::acs::Cache

Class ::acs::HashKeyPartitionedCache

::acs::HashKeyPartitionedCache[i] create ... \
           [ -default_size (default "100KB") ] \
           [ -maxentry:integer maxentry:integer ] \
           [ -name name ] \
           [ -package_key:required package_key:required ] \
           [ -parameter:required parameter:required ] \
           [ -partitions:integer (default "2") ] \
           [ -timeout (default "5m") ]

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
Defined in packages/acs-tcl/tcl/acs-cache-procs.tcl

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::acs::KeyPartitionedCache[i]

Methods (to be applied on instances)

  • flush_pattern (scripted, public)

     <instance of acs::HashKeyPartitionedCache[i]> flush_pattern \
        -partition_key partition_key  pattern

    flush just in all partitions

    Switches:
    -partition_key (required)
    Parameters:
    pattern (required)

    Testcases:
    No testcase defined.
  • set (scripted, public)

     <instance of acs::HashKeyPartitionedCache[i]> set \
        -partition_key partition_key  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.

    Switches:
    -partition_key (required)
    Parameters:
    key (required)
    value (required)

    Testcases:
    No testcase defined.