cache

package
v0.13.0-alpha.58 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 3 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[K comparable, T any] struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache[K comparable, T any]() *Cache[K, T]

func (*Cache[K, T]) Evict

func (c *Cache[K, T]) Evict()

func (*Cache[K, T]) Get

func (c *Cache[K, T]) Get(key K) (T, bool)

func (*Cache[K, T]) Set

func (c *Cache[K, T]) Set(key K, value T, ttl time.Duration)

Jump to

Keyboard shortcuts

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