Versions in this module Expand all Collapse all v0 v0.1.5 Jun 13, 2026 Changes in this version type Cache + GetSet func(key string, newVal []byte, ttl time.Duration) ([]byte, bool) + IncrBy func(key string, delta int64) (int64, error) + SetTTL func(key string, ttl time.Duration) bool type Config + func DevConfig() Config + func (c Config) MaxValueSize() int v0.1.2 Mar 4, 2026 Changes in this version + const Version + var DefaultClasses = []slabber.SizeClass + type Cache interface + Close func() + DBSize func() int + Del func(key string) bool + Exists func(key string) bool + Flush func() + Get func(key string) ([]byte, bool) + GetCopy func(key string) ([]byte, bool) + GetDel func(key string) ([]byte, bool) + GetInto func(key string, dst []byte) ([]byte, bool) + Keys func(pattern string) []string + MGet func(keys ...string) [][]byte + MSet func(ttl time.Duration, pairs map[string][]byte) + Rename func(from, to string) bool + Set func(key string, value []byte, ttl time.Duration) + SetNX func(key string, value []byte, ttl time.Duration) bool + Stats func() CacheStats + TTL func(key string) (time.Duration, bool) + func New(cfg Config) Cache + func NewDefault() Cache + type CacheStats struct + Keys int + SlabStats []slabber.Stats + type Config struct + BucketsPerShard int + Classes []slabber.SizeClass + ReaperInterval time.Duration + Shards int + type Server struct + func NewServer(addr string, c Cache, logger *log.Logger) (*Server, error) + func (s *Server) Addr() string + func (s *Server) Close() error + func (s *Server) Serve() error