xcache

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LRUCache

type LRUCache struct {
	// contains filtered or unexported fields
}

func NewLRU

func NewLRU(max ...int) *LRUCache

func (*LRUCache) Delete

func (l *LRUCache) Delete(key interface{})

func (*LRUCache) Dump

func (l *LRUCache) Dump() string

func (*LRUCache) Keys added in v1.2.7

func (l *LRUCache) Keys() []interface{}

func (*LRUCache) Len

func (l *LRUCache) Len() int

Len 长度 return -1 的话, 长度不正确

func (*LRUCache) Load

func (l *LRUCache) Load(key interface{}) (data interface{}, ok bool)

func (*LRUCache) SetDelCallBackFn

func (l *LRUCache) SetDelCallBackFn(f func(key, value interface{}))

func (*LRUCache) Store

func (l *LRUCache) Store(key, value interface{})

Jump to

Keyboard shortcuts

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