cache

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTimeout time.Duration = 30 * time.Minute

Functions

This section is empty.

Types

type Cache

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

func New

func New[T any]() *Cache[T]

func NewWithTimeout added in v0.6.3

func NewWithTimeout[T any](dur time.Duration) *Cache[T]

func (*Cache[T]) Get

func (ct *Cache[T]) Get(key string) (T, bool)

func (*Cache[T]) Set

func (ct *Cache[T]) Set(key string, value T)

Jump to

Keyboard shortcuts

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