Documentation
¶
Overview ¶
Package lru provides a small thread-safe LRU cache with a per-entry TTL. The engine uses it to reuse a parsed *workflow.Graph across the many steps of one flow instead of re-unmarshalling the frozen graph JSON every step.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[K comparable, V any] struct { // contains filtered or unexported fields }
Cache is a small thread-safe LRU with a per-entry TTL.
func New ¶
New creates a cache bounded to maxEntries with the given per-entry TTL. A non-positive maxEntries disables eviction by count; a non-positive ttl disables expiry.
Click to show internal directories.
Click to hide internal directories.