Versions in this module Expand all Collapse all v1 v1.3.9 May 20, 2024 Changes in this version + var SharedInt64Cache = NewBigCache[int64]() + var SharedManager = NewManager() + func HashKeyBytes(key []byte) uint64 + func HashKeyString(key string) uint64 + type Cache struct + func NewBigCache[T any]() *Cache[T] + func NewCache[T any](opt ...OptionInterface) *Cache[T] + func (this *Cache[T]) Clean() + func (this *Cache[T]) Count() (count int) + func (this *Cache[T]) Delete(key string) + func (this *Cache[T]) Destroy() + func (this *Cache[T]) GC() + func (this *Cache[T]) IncreaseInt64(key string, delta T, expiresAt int64, extend bool) T + func (this *Cache[T]) Read(key string) (item *Item[T]) + func (this *Cache[T]) Write(key string, value T, expiresAt int64) (ok bool) + type GCAble interface + GC func() + type Item struct + Value T + type Manager struct + func NewManager() *Manager + func (this *Manager) Add(cache GCAble) + func (this *Manager) Count() int + func (this *Manager) Remove(cache GCAble) + type MaxItemsOption struct + Count int + func NewMaxItemsOption(count int) *MaxItemsOption + type OptionInterface interface + type Piece struct + func NewPiece[T any](maxItems int) *Piece[T] + func (this *Piece[T]) Add(key uint64, item *Item[T]) (ok bool) + func (this *Piece[T]) Clean() + func (this *Piece[T]) Count() (count int) + func (this *Piece[T]) Delete(key uint64) + func (this *Piece[T]) Destroy() + func (this *Piece[T]) GC() + func (this *Piece[T]) IncreaseInt64(key uint64, delta T, expiresAt int64, extend bool) (result T) + func (this *Piece[T]) Read(key uint64) (item *Item[T]) + type PiecesOption struct + Count int + func NewPiecesOption(count int) *PiecesOption