Documentation
¶
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 simple LRU (Least Recently Used) cache implementation.
func NewCache ¶
func NewCache[K comparable, V any](capacity int) *Cache[K, V]
NewCache creates a new LRU cache with the given capacity.
Click to show internal directories.
Click to hide internal directories.