Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TTLCache ¶
type TTLCache struct {
// contains filtered or unexported fields
}
TTLCache is a simple in-memory cache with per-entry TTL expiry. Safe for concurrent use. Background goroutine evicts stale entries every 30s. Call Stop() to shut down the background goroutine.
func (*TTLCache) Len ¶ added in v0.5.0
Len reports the entries currently held, expired ones included until the eviction loop sweeps them.
Click to show internal directories.
Click to hide internal directories.