package
module
Version:
v0.0.0-...-064b614
Opens a new window with list of versions in this module.
Published: Feb 12, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
tinybox
a very simple cache pkg
Documentation
¶
type Item[T any] struct {
}
type LRU[T any] struct {
}
LRU is a LRU container.
It is not safe for concurrent access for now.
func NewLRU[T any](maxBytes int, onEvicted func(key string, value T)) *LRU[T]
Add adds a new key-value pair to the LRU.
Get lookups the mapped value by key.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.