cache

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MemCacheDelete

func MemCacheDelete(ctx context.Context, cc *cache.Cache, keyFmt string, args ...interface{}) bool

func MemCacheFunc

func MemCacheFunc(ctx context.Context, cc *cache.Cache, expire time.Duration, f interface{}, keyFmt string, args ...interface{}) (interface{}, error)

func RdsCacheFunc

func RdsCacheFunc(ctx context.Context, rds redis.UniversalClient, rdsExpire int, f interface{}, keyFmt string,
	args ...interface{}) (interface{}, error)

func RdsCacheMultiFunc

func RdsCacheMultiFunc(ctx context.Context, rds redis.UniversalClient, rdsExpire int, fMulti interface{}, keyFmt string,
	args []string) (interface{}, error)

通用场景过于复杂,限定参数,返回类型为 map[string]*struct fMulti示例: func getThingsByIds(ctx context.Context, ids []string) (map[string]*Thing, error)

func RdsDeleteCache

func RdsDeleteCache(ctx context.Context, rds redis.UniversalClient, keyFmt string, args ...interface{}) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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