xcache

package
v1.3.7 Latest Latest
Warning

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

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

README

xcache

介绍
  • 对 缓存 进行封装

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

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