cachelruspecialised

package
v0.0.0-...-8084858 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheLRU

type CacheLRU[K comparable, V any] struct {
	Queue *list.List
	Cache map[K]*item[V]
	// contains filtered or unexported fields
}

func NewCacheLRU

func NewCacheLRU[K comparable, V any](params *ParamsNewCacheLRU) *CacheLRU[K, V]

func (*CacheLRU[K, V]) Delete

func (c *CacheLRU[K, V]) Delete(key K) error

func (*CacheLRU[K, V]) Get

func (c *CacheLRU[K, V]) Get(key K) (*V, error)

func (*CacheLRU[K, V]) Put

func (c *CacheLRU[K, V]) Put(key K, value V)

func (*CacheLRU[K, V]) PutTTL

func (c *CacheLRU[K, V]) PutTTL(key K, value V)

func (*CacheLRU[K, V]) String

func (c *CacheLRU[K, V]) String() string

type ParamsNewCacheLRU

type ParamsNewCacheLRU struct {
	TTL      time.Duration
	Capacity uint16
}

Jump to

Keyboard shortcuts

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