package
1.1.0-alpha
Repository: https://github.com/lightkool/pd.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.
NewTTL returns a new TTL 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.
TTL is a cache that assigns TTL(Time-To-Live) for each items.
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.