Documentation
¶
Index ¶
- func NewClockCache[K comparable, V any](capacity int) v1.Cache[K, V]
- func NewFifoCache[K comparable, V any](capacity int) v1.Cache[K, V]
- func NewLfuCache[K comparable, V any](capacity int) v1.Cache[K, V]
- func NewLruCache[K comparable, V any](capacity int) v1.Cache[K, V]
- func NewMruCache[K comparable, V any](capacity int) v1.Cache[K, V]
- type ClockCache
- func (c ClockCache[K, V]) Contains(key K) bool
- func (c ClockCache[K, V]) Delete(key K)
- func (c ClockCache[K, V]) Empty()
- func (c ClockCache[K, V]) Get(key K) (value V, ok bool)
- func (c ClockCache[K, V]) Keys() []K
- func (c ClockCache[K, V]) Len() int
- func (c ClockCache[K, V]) Set(key K, val V)
- func (c ClockCache[K, V]) SetWithExp(key K, val V, exp time.Duration)
- type FifoCache
- func (c FifoCache[K, V]) Contains(key K) bool
- func (c FifoCache[K, V]) Delete(key K)
- func (c FifoCache[K, V]) Empty()
- func (c FifoCache[K, V]) Get(key K) (value V, ok bool)
- func (c FifoCache[K, V]) Keys() []K
- func (c FifoCache[K, V]) Len() int
- func (c FifoCache[K, V]) Set(key K, val V)
- func (c FifoCache[K, V]) SetWithExp(key K, val V, exp time.Duration)
- type LfuCache
- func (c LfuCache[K, V]) Contains(key K) bool
- func (c LfuCache[K, V]) Delete(key K)
- func (c LfuCache[K, V]) Empty()
- func (c LfuCache[K, V]) Get(key K) (value V, ok bool)
- func (c LfuCache[K, V]) Keys() []K
- func (c LfuCache[K, V]) Len() int
- func (c LfuCache[K, V]) Set(key K, val V)
- func (c LfuCache[K, V]) SetWithExp(key K, val V, exp time.Duration)
- type LruCache
- func (c LruCache[K, V]) Contains(key K) bool
- func (c LruCache[K, V]) Delete(key K)
- func (c LruCache[K, V]) Empty()
- func (c LruCache[K, V]) Get(key K) (value V, ok bool)
- func (c LruCache[K, V]) Keys() []K
- func (c LruCache[K, V]) Len() int
- func (c LruCache[K, V]) Set(key K, val V)
- func (c LruCache[K, V]) SetWithExp(key K, val V, exp time.Duration)
- type MruCache
- func (c MruCache[K, V]) Contains(key K) bool
- func (c MruCache[K, V]) Delete(key K)
- func (c MruCache[K, V]) Empty()
- func (c MruCache[K, V]) Get(key K) (value V, ok bool)
- func (c MruCache[K, V]) Keys() []K
- func (c MruCache[K, V]) Len() int
- func (c MruCache[K, V]) Set(key K, val V)
- func (c MruCache[K, V]) SetWithExp(key K, val V, exp time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClockCache ¶
func NewClockCache[K comparable, V any](capacity int) v1.Cache[K, V]
func NewFifoCache ¶
func NewFifoCache[K comparable, V any](capacity int) v1.Cache[K, V]
func NewLfuCache ¶
func NewLfuCache[K comparable, V any](capacity int) v1.Cache[K, V]
func NewLruCache ¶
func NewLruCache[K comparable, V any](capacity int) v1.Cache[K, V]
func NewMruCache ¶
func NewMruCache[K comparable, V any](capacity int) v1.Cache[K, V]
Types ¶
type ClockCache ¶
type ClockCache[K comparable, V any] struct { // contains filtered or unexported fields }
func (ClockCache[K, V]) Contains ¶
func (c ClockCache[K, V]) Contains(key K) bool
func (ClockCache[K, V]) Delete ¶
func (c ClockCache[K, V]) Delete(key K)
func (ClockCache[K, V]) Empty ¶
func (c ClockCache[K, V]) Empty()
func (ClockCache[K, V]) Get ¶
func (c ClockCache[K, V]) Get(key K) (value V, ok bool)
func (ClockCache[K, V]) Keys ¶
func (c ClockCache[K, V]) Keys() []K
func (ClockCache[K, V]) Len ¶
func (c ClockCache[K, V]) Len() int
func (ClockCache[K, V]) Set ¶
func (c ClockCache[K, V]) Set(key K, val V)
func (ClockCache[K, V]) SetWithExp ¶
func (c ClockCache[K, V]) SetWithExp(key K, val V, exp time.Duration)
type FifoCache ¶
type FifoCache[K comparable, V any] struct { // contains filtered or unexported fields }
func (FifoCache[K, V]) SetWithExp ¶
type LfuCache ¶
type LfuCache[K comparable, V any] struct { // contains filtered or unexported fields }
func (LfuCache[K, V]) SetWithExp ¶
type LruCache ¶
type LruCache[K comparable, V any] struct { // contains filtered or unexported fields }
func (LruCache[K, V]) SetWithExp ¶
type MruCache ¶
type MruCache[K comparable, V any] struct { // contains filtered or unexported fields }
func (MruCache[K, V]) SetWithExp ¶
Click to show internal directories.
Click to hide internal directories.