package
Version:
v1.10.2
Opens a new window with list of versions in this module.
Published: Nov 22, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
HashKey creates a cache key from a prompt string
type CacheEntry struct {
Value any
ExpiresAt time.Time
}
CacheEntry holds a cached value with expiration
LRUCache is a thread-safe LRU cache with TTL support
NewLRUCache creates a new LRU cache with the given capacity and TTL
Clear removes all entries from the cache
Get retrieves a value from the cache
Len returns the number of items in the cache
Set adds or updates a value in the cache
Source Files
¶
Click to show internal directories.
Click to hide internal directories.