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

Function NewCommentCache

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

Source from the content-addressed store, hash-verified

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

Callers 1

InitWebServerFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected