cache

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TypeSIMPLE cacheType = gcache.TYPE_SIMPLE
	TypeLRU    cacheType = gcache.TYPE_LRU
	TypeLFU    cacheType = gcache.TYPE_LFU
	TypeARC    cacheType = gcache.TYPE_ARC
)

Variables

This section is empty.

Functions

func ARC

func ARC() gcache.Cache

ARC constantly balances between LRU and LFU, to improve the combined result.

func LFU

func LFU() gcache.Cache

LFU discards the least frequently used items first.

func LRU

func LRU() gcache.Cache

LRU discards the least recently used items first.

func New

func New(size int, evictType cacheType, expire time.Duration) gcache.Cache

func SIMPLE

func SIMPLE() gcache.Cache

SIMPLE no clear priority for evict cache. It depends on key-value map order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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