cache

package
v1.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPool

type KeyPool[K comparable] interface {
	Get(key K) string
}

KeyPool[K] key pool used for cache keys

func MustKeyPool added in v0.8.2

func MustKeyPool[K comparable](size int, newFn func(key K) string) KeyPool[K]

MustKeyPool[K] same as NewKeyPool[K] bug panic if occurs error

func NewKeyPool

func NewKeyPool[K comparable](size int, newFn func(key K) string) (KeyPool[K], error)

NewKeyPool[K] create a new KeyPool[K] instance

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL