package
Version:
v1.1.1
Opens a new window with list of versions in this module.
Published: Jul 26, 2025
License: BSD-3-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
NewCache creates a new LRU cache with the given capacity
Cache implements an LRU cache
func (c *Cache[K, V]) Evict(key K)
Evict removes a key from the cache
func (c *Cache[K, V]) Flush()
Flush clears the cache
Get retrieves a value from the cache
Len returns the number of items in the cache
func (c *Cache[K, V]) Put(key K, value V)
Put adds a key-value pair to the cache
Source Files
¶
Click to show internal directories.
Click to hide internal directories.