Documentation
¶
Overview ¶
Package cache provides lightweight, concurrency-safe in-memory caches used by RADIUS protocol hot paths.
The package currently exposes a generic TTL cache that stores entries by string key, evicts expired entries lazily, and bounds memory growth with a configurable maximum entry count.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TTLCache ¶
type TTLCache[T any] struct { // contains filtered or unexported fields }
TTLCache provides a minimal, concurrency-safe cache with a fixed TTL per entry.
func NewTTLCache ¶
NewTTLCache creates a TTL-bound cache. maxEntries <= 0 falls back to 1.
Click to show internal directories.
Click to hide internal directories.