Documentation
¶
Index ¶
- Constants
- func GetGen(ctx context.Context, group string) (int64, error)
- func GetGenerationFromCache(ctx context.Context, c generationalInterface, group string) (int64, error)
- func GetItem[T any](ctx context.Context, ttl time.Duration, gen int64, group string, key []string, ...) (result T, err error)
- func GetItemFromCache[T1, T2 any](ctx context.Context, c cache.TypedCache[T1], ttl time.Duration, gen int64, ...) (result T2, err error)
- type GenerationKey
- type KeyGenerator
- func GenerationKeyFromCache(ctx context.Context, c generationalInterface, group string) (KeyGenerator, error)
- func GetKey(ctx context.Context, group string, key ...string) (KeyGenerator, error)
- func RollOver(ctx context.Context, group string, ttl time.Duration) (KeyGenerator, error)
- func RollOverFromCache(ctx context.Context, c generationalInterface, group string, ttl time.Duration) (KeyGenerator, error)
Constants ¶
View Source
const ( DEFAULT_GENERATION_KEY_PREFIX = "cache.generationalcache" KEY_DELIMITER = "." )
Variables ¶
This section is empty.
Functions ¶
func GetGenerationFromCache ¶
Types ¶
type GenerationKey ¶
type GenerationKey = string
type KeyGenerator ¶
type KeyGenerator = func(...string) GenerationKey
func GenerationKeyFromCache ¶
func GenerationKeyFromCache(ctx context.Context, c generationalInterface, group string) (KeyGenerator, error)
func RollOver ¶
RollOver increments the generation key in the It also returns a GenerationKey generator.
func RollOverFromCache ¶
func RollOverFromCache(ctx context.Context, c generationalInterface, group string, ttl time.Duration) (KeyGenerator, error)
RollOverFromCache increments the generation key in the It also returns a GenerationKey.
Click to show internal directories.
Click to hide internal directories.