Documentation
¶
Index ¶
- Constants
- type Store
- func (s *Store[K, V]) Add(key K, item data.Item[K, V])
- func (s *Store[K, V]) Flush()
- func (s *Store[K, V]) Get(key K) (data.Item[K, V], bool)
- func (s *Store[K, V]) Items() map[K]data.Item[K, V]
- func (s *Store[K, V]) Keys() []K
- func (s *Store[K, V]) Len() int
- func (s *Store[K, V]) RandomKey() (K, bool)
- func (s *Store[K, V]) Remove(keys ...K)
Constants ¶
View Source
const ( PolicyName string = "allkeyslfu" DefaultCapacity int = 10_000 MinimumCapacity int = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store[K comparable, V any] struct { // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.