cache

package
v0.0.0-...-27f069a Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: ISC Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[V any] struct {
	// contains filtered or unexported fields
}

func New

func New[V any](ctx *context.Context, expirationInterval time.Duration, purgeInterval time.Duration) *Cache[V]

func (*Cache[V]) Delete

func (cu *Cache[V]) Delete(key string)

func (*Cache[V]) Get

func (cu *Cache[V]) Get(key string) (V, bool)

func (*Cache[V]) Set

func (cu *Cache[V]) Set(key string, value V)

Jump to

Keyboard shortcuts

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