Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithNotFoundTtl ¶
Types ¶
type Cache ¶
type Cache[T any] interface { Contains(key string) bool Expire(key string) bool Get(key string) (T, bool) Set(key string, value T) SetX(key string, value T, ttl time.Duration) Provide(key string, provider func() T) T ProvideWithError(key string, provider func() (T, error)) (T, error) }
func NewWithConfiguration ¶
Click to show internal directories.
Click to hide internal directories.