class

CogUtil::CognitiveCache(K, V)

Inherits Reference < Object

Cache-optimized data structure for cognitive operations

Constants

DEFAULT_CAPACITY = 8192

Cache configuration optimized for cognitive workloads

LOAD_FACTOR = 0.75

Constructors

new(capacity : Int32 = DEFAULT_CAPACITY)
Source

Instance methods

[](key : K) : V | Nil

Get value by key with cache optimization

Source
[]=(key : K, value : V)

Set value by key with LFU eviction

Source
capacity

Current cache capacity

Source
clear

Clear all entries

Source
delete(key : K) : V | Nil

Remove key

Source
has_key?(key : K) : Bool

Check if key exists

Source
size

Current cache size

Source
stats

Get cache statistics

Source
utilization

Cache utilization percentage

Source

Nested types