package
0.0.0-20240930074603-f0ba3941aa7d
Repository: https://github.com/finddiff/rulebaseproxy.git
Documentation: pkg.go.dev

# Functions

New return *Cache.
NewLRUCache creates an LruCache.
WithAge defined element max age (second).
WithEvict set the evict callback.
WithSize defined max length of LruCache.
WithStale decide whether Stale return is enabled.
WithUpdateAgeOnGet update expires when Get element.

# Structs

Cache store element with a expired time.
LruCache is a thread-safe, in-memory lru-cache that evicts the least recently used entries from memory when (if set) the entries are older than maxAge (in seconds).

# Type aliases

EvictCallback is used to get a callback when a cache entry is evicted.
Option is part of Functional Options Pattern.