localcache

package module
v0.0.6-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 3 Imported by: 0

README

go_localCache

a localCache for Golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LFUCache

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

func NewLFU

func NewLFU(capacity int) *LFUCache

func (*LFUCache) Add

func (lfu *LFUCache) Add(key, val interface{}) error

func (*LFUCache) Get

func (lfu *LFUCache) Get(key interface{}) (val interface{}, ok bool)

type LRUCache

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

func NewLRU

func NewLRU(capacity int) *LRUCache

func (*LRUCache) Add

func (lru *LRUCache) Add(key, val interface{}) error

func (*LRUCache) Del

func (lru *LRUCache) Del(key interface{})

func (*LRUCache) Get

func (lru *LRUCache) Get(key interface{}) (val interface{}, ok bool)

func (*LRUCache) GetALL

func (lru *LRUCache) GetALL() []*LruNode

type LfuNode

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

type LruNode

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

Jump to

Keyboard shortcuts

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