Versions in this module Expand all Collapse all v0 v0.0.1 Mar 15, 2025 Changes in this version + type Cache interface + Contains func(key K) bool + Del func(key K) + Get func(key K) (V, bool) + Keys func() []K + Len func() int + Peek func(key K) (V, bool) + Purge func() + Set func(key K, value V) + type ShardedCache struct + func NewShardedCache[K string, V any](numShards int, sizePerShard int, cacheFactory func(size int) Cache[K, V]) *ShardedCache[K, V] + func (sc *ShardedCache[K, V]) Del(key K) + func (sc *ShardedCache[K, V]) Get(key K) (V, bool) + func (sc *ShardedCache[K, V]) Len() int + func (sc *ShardedCache[K, V]) Set(key K, value V) + type TwoQueue struct + func New2Q[K comparable, V any](capacity int) *TwoQueue[K, V] + func (c *TwoQueue[K, V]) Contains(key K) bool + func (c *TwoQueue[K, V]) Del(key K) + func (c *TwoQueue[K, V]) Get(key K) (V, bool) + func (c *TwoQueue[K, V]) Keys() []K + func (c *TwoQueue[K, V]) Len() int + func (c *TwoQueue[K, V]) Peek(key K) (V, bool) + func (c *TwoQueue[K, V]) Purge() + func (c *TwoQueue[K, V]) Set(key K, value V)