cache

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v1.0.2

type Option struct {
	// contains filtered or unexported fields
}

type OptionFunc added in v1.0.2

type OptionFunc func(*Option)

func WithTry added in v1.0.2

func WithTry(try int) OptionFunc

type RedisCache

type RedisCache struct {
	*Option
	// contains filtered or unexported fields
}

func New

func New(c redis.Cmdable, locker lock.Locker, opts ...OptionFunc) (*RedisCache, error)

func (*RedisCache) FlushCache

func (rc *RedisCache) FlushCache(ctx context.Context, key string, ttl time.Duration, virtualTTL time.Duration, f cache.LoadFunc, data interface{}) (err error)

func (*RedisCache) GetData

func (rc *RedisCache) GetData(ctx context.Context, key string, ttl time.Duration, virtualTTL time.Duration, f cache.LoadFunc, data interface{}) (err error)

Jump to

Keyboard shortcuts

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