Versions in this module Expand all Collapse all v1 v1.0.0 Jun 7, 2023 Changes in this version + type Cache interface + Get func(ctx context.Context, cmd, key string) (interface{}, float64, float64, error) + Put func(ctx context.Context, cmd, key string, ttl, delta time.Duration, ...) error + type Fetcher interface + Get func(ctx context.Context, cache Cache, cmd, key string) (*Retrieval, error) + Put func(ctx context.Context, cache Cache, cmd, key string, ttl, delta time.Duration, ...) error + func NewFetcher(beta float64) Fetcher + func NewFetcherWithRandomizer(beta float64, randomizer Randomizer) Fetcher + type Randomizer func() float64 + type Retrieval struct + ShouldRefresh bool + Value interface{}