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) (*model.UserExample, 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
Click to show internal directories.
Click to hide internal directories.