cacheTool

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCache

func WithCache[T any](
	ctx context.Context,
	cache *redisCache.Cache,
	cacheKey string,
	ttl time.Duration,
	fetchFunc func(ctx context.Context) (T, error),
	optChains ...*Option,
) (T, error)

Types

type Option

type Option struct {
	NoCacheMongoNoDocuments bool
	SetXX                   bool
	SetNX                   bool
	SkipLocalCache          bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL