cache

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 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 TTLCache

type TTLCache[T any] struct {
	// contains filtered or unexported fields
}

func NewTTLCache

func NewTTLCache[T any](ttl time.Duration) *TTLCache[T]

func (*TTLCache[T]) Get

func (c *TTLCache[T]) Get(key string, now time.Time) (T, bool)

func (*TTLCache[T]) Set

func (c *TTLCache[T]) Set(key string, value T, now time.Time)

Jump to

Keyboard shortcuts

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