Versions in this module Expand all Collapse all v0 v0.3.0 Jul 30, 2022 Changes in this version + var BytesSharder = HashingSharder(func(k []byte, h H) { ... }) + var StringSharder = HashingSharder(func(k string, h H) { ... }) + func HashingSharder(f func(K, H)) func(K) uint64 + type H interface + Write func(buf []byte) (int, error) + WriteBool func(bool) + WriteFloat32 func(float32) + WriteFloat64 func(float64) + WriteString func(buf string) (int, error) + WriteUint16 func(uint16) + WriteUint32 func(uint32) + WriteUint64 func(uint64) + WriteUint8 func(uint8) + type LazyLRU struct + func New(maxItemsPerShard int, ttl time.Duration, numShards int) *LazyLRU[string, any] + func NewT(maxItemsPerShard int, ttl time.Duration, numShards int, sharder func(K) uint64) *LazyLRU[K, V] + func (slru *LazyLRU[K, V]) Close() + func (slru *LazyLRU[K, V]) Get(key K) (V, bool) + func (slru *LazyLRU[K, V]) IsRunning() bool + func (slru *LazyLRU[K, V]) Len() int + func (slru *LazyLRU[K, V]) MGet(keys ...K) map[K]V + func (slru *LazyLRU[K, V]) MSet(keys []K, values []V) error + func (slru *LazyLRU[K, V]) MSetTTL(keys []K, values []V, ttl time.Duration) error + func (slru *LazyLRU[K, V]) Reap() + func (slru *LazyLRU[K, V]) Set(key K, value V) + func (slru *LazyLRU[K, V]) SetTTL(key K, value V, ttl time.Duration) + func (slru *LazyLRU[K, V]) ShardIx(key K) int + func (slru *LazyLRU[K, V]) Stats() lazylru.Stats