Versions in this module Expand all Collapse all v1 v1.0.14 Jan 30, 2024 v1.0.12 Jan 30, 2024 Changes in this version + type CacheConfig struct + MaxNumBytes uint32 + MaxNumItems uint32 + Name string + NumChunks uint32 + NumItemsToPreemptivelyEvict uint32 + func (config *CacheConfig) String() string + func (config *CacheConfig) Verify() error + type ImmunityCache struct + func NewImmunityCache(config CacheConfig) (*ImmunityCache, error) + func (ic *ImmunityCache) Clear() + func (ic *ImmunityCache) Close() error + func (ic *ImmunityCache) Count() int + func (ic *ImmunityCache) CountImmune() int + func (ic *ImmunityCache) Diagnose(_ bool) + func (ic *ImmunityCache) ForEachItem(function types.ForEachItem) + func (ic *ImmunityCache) Get(key []byte) (value interface{}, ok bool) + func (ic *ImmunityCache) Has(key []byte) bool + func (ic *ImmunityCache) HasOrAdd(key []byte, value interface{}, sizeInBytes int) (has, added bool) + func (ic *ImmunityCache) ImmunizeKeys(keys [][]byte) (numNowTotal, numFutureTotal int) + func (ic *ImmunityCache) IsInterfaceNil() bool + func (ic *ImmunityCache) Keys() [][]byte + func (ic *ImmunityCache) Len() int + func (ic *ImmunityCache) MaxSize() int + func (ic *ImmunityCache) NumBytes() int + func (ic *ImmunityCache) Peek(key []byte) (value interface{}, ok bool) + func (ic *ImmunityCache) Put(key []byte, value interface{}, sizeInBytes int) (evicted bool) + func (ic *ImmunityCache) RegisterHandler(func(key []byte, value interface{}), string) + func (ic *ImmunityCache) Remove(key []byte) + func (ic *ImmunityCache) RemoveOldest() + func (ic *ImmunityCache) RemoveWithResult(key []byte) bool + func (ic *ImmunityCache) SizeInBytesContained() uint64 + func (ic *ImmunityCache) UnRegisterHandler(_ string)