cache

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PrefixUserExampleCacheKey cache prefix
	PrefixUserExampleCacheKey = "userExample:"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UserExampleCache

type UserExampleCache interface {
	Set(ctx context.Context, id uint64, data *model.UserExample, duration time.Duration) error
	Get(ctx context.Context, id uint64) (ret *model.UserExample, err error)
	MultiGet(ctx context.Context, ids []uint64) (map[string]*model.UserExample, error)
	MultiSet(ctx context.Context, data []*model.UserExample, duration time.Duration) error
	Del(ctx context.Context, id uint64) error
	SetCacheWithNotFound(ctx context.Context, id uint64) error
}

UserExampleCache cache interface

func NewUserExampleCache

func NewUserExampleCache(cacheType *model.CacheType) UserExampleCache

NewUserExampleCache new a cache

Jump to

Keyboard shortcuts

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