Versions in this module Expand all Collapse all v2 v2.0.1 Dec 25, 2023 v2.0.0 Dec 25, 2023 Changes in this version + var ErrCacheMiss = errors.New("cache miss") + var ErrInvalidCap = errors.New("cache cap <= 0") + type Cache struct + func New[K comparable, V any](cap int) (cache *Cache[K, V], err error) + func (cache *Cache[K, V]) Cap() int + func (cache *Cache[K, V]) Get(key K) (value V, err error) + func (cache *Cache[K, V]) IsEmpty() bool + func (cache *Cache[K, V]) IsFull() bool + func (cache *Cache[K, V]) Len() int + func (cache *Cache[K, V]) Set(key K, value V) (err error) Other modules containing this package github.com/NdoleStudio/lfu-cache