cache

package
v0.0.0-...-2149ff8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 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, V any] struct {
	*gc.Cache[K, V]
}

func New

func New[K comparable, V any](capacity int) *Cache[K, V]

New returns a new cache with the given capacity. If capacity is 0, the cache will have no limit on the number of items it can hold. Uses LFU eviction policy.

func (*Cache[K, V]) DeleteAll

func (c *Cache[K, V]) DeleteAll()

DeleteAll deletes all items from the cache.

Jump to

Keyboard shortcuts

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