cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimedCache

type TimedCache[T comparable] struct {
	// contains filtered or unexported fields
}

func NewTimedCache

func NewTimedCache[T comparable](timeout time.Duration, sweepThreshold int) *TimedCache[T]

func (*TimedCache[T]) GetAndRemove

func (c *TimedCache[T]) GetAndRemove(k T) (time.Time, bool)

func (*TimedCache[T]) Insert

func (c *TimedCache[T]) Insert(k T)

Jump to

Keyboard shortcuts

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