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] interface { Get(key K) (V, bool) Put(key K, val V) Remove(key K) bool Len() int Clear() }
type Entry ¶
type Entry[K comparable, V any] struct { Key K Value V }
type LruCache ¶
type LruCache[K comparable, V any] struct { Size int // contains filtered or unexported fields }
type SimpleCache ¶
type SimpleCache[K comparable, V any] struct { Size int // contains filtered or unexported fields }
func (*SimpleCache[K, V]) Clear ¶
func (it *SimpleCache[K, V]) Clear()
func (*SimpleCache[K, V]) Get ¶
func (it *SimpleCache[K, V]) Get(key K) (V, bool)
func (*SimpleCache[K, V]) Len ¶
func (it *SimpleCache[K, V]) Len() int
func (*SimpleCache[K, V]) Put ¶
func (it *SimpleCache[K, V]) Put(key K, val V)
func (*SimpleCache[K, V]) Remove ¶
func (it *SimpleCache[K, V]) Remove(key K) bool
Click to show internal directories.
Click to hide internal directories.