Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketCache ¶
type BucketCache[K comparable, V comparable] struct { // contains filtered or unexported fields }
func New ¶
func New[K comparable, V comparable](cacheSize uint32, maxBucketSize uint32, hash freelru.HashKeyCallback[K]) (*BucketCache[K, V], error)
func (*BucketCache[K, V]) AddToBucket ¶
func (b *BucketCache[K, V]) AddToBucket(k K, val V) bool
func (*BucketCache[K, V]) ForceAddToBucket ¶
func (b *BucketCache[K, V]) ForceAddToBucket(k K, val V)
func (*BucketCache[K, V]) GetBucket ¶
func (b *BucketCache[K, V]) GetBucket(k K) []V
func (*BucketCache[K, V]) RemoveBucket ¶ added in v1.36.1
func (b *BucketCache[K, V]) RemoveBucket(k K) bool
func (*BucketCache[K, V]) RemoveFromBucket ¶ added in v1.36.1
func (b *BucketCache[K, V]) RemoveFromBucket(k K, val V) bool
Click to show internal directories.
Click to hide internal directories.