MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / NewUserCache

Function NewUserCache

internal/repository/cache/user.go:23–28  ·  view source on GitHub ↗
(cmd redis.Cmdable)

Source from the content-addressed store, hash-verified

21}
22
23func NewUserCache(cmd redis.Cmdable) UserCache {
24 return &userCache{
25 cmd: cmd,
26 expiration: time.Minute * 15,
27 }
28}
29
30// Get 从redis中获取数据并反序列化
31func (u *userCache) Get(ctx context.Context, uid int64) (domain.User, error) {

Callers 1

InitWebServerFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected