package
0.3.0
Repository: https://github.com/matrixorigin/matrixcube.git
Documentation: pkg.go.dev

# Functions

NewCache create Cache instance by CacheType.
NewDefaultCache create Cache instance by default cache type.
NewFIFO returns a new FIFO cache.
NewIDTTL creates a new TTLUint64 cache.
NewStringTTL creates a new TTLString cache.

# Constants

LRUCache is for LRU cache.
TwoQueueCache is for 2Q cache.

# Variables

DefaultCacheType set default cache type for NewDefaultCache function.

# Structs

FIFO is 'First-In-First-Out' cache.
Item is the cache entry.
LRU is 'Least-Recently-Used' cache.
TTLString is simple TTL saves key string and value.
TTLUint64 is simple TTL saves only uint64s.
TwoQueue is a fixed size 2Q cache.

# Interfaces

Cache is an interface for cache system.

# Type aliases

Type is cache's type such as LRUCache and etc.