nsmcp::AccessTimeIndex object method slot (public)
nsmcp::AccessTimeIndexslot key
Defined in /usr/local/ns/tcl/nsmcp/log-traffic-index.tcl
Choose a bounded server-local cache slot.
- Parameters:
- key (required)
- Index key.
- Returns:
- Slot number.
- Testcases:
- No testcase defined.
Source code: scan [string range $key 0 3] %x first set first [expr {$first % 64}] # Open addressing avoids losing a live-file index merely because one of # its rotations hashes to the same slot. The namespace never exceeds 64 # slots, including concurrent writers; replacement only loses acceleration. for {set i 0} {$i<64} {incr i} { set slot [expr {($first+$i)%64}] if {[catch { nsv_get nsmcp:access-time-index:[ns_info server] $slot } entry] || [dict get $entry key] eq $key} { return $slot } } return $firstXQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)