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

Interface PostCache

internal/repository/cache/post.go:14–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12)
13
14type PostCache interface {
15 Get(ctx context.Context, key string) (domain.Post, error)
16 Set(ctx context.Context, key string, post domain.Post) error
17 Del(ctx context.Context, key string) error
18 PreHeat(ctx context.Context, posts []domain.Post) error
19 GetList(ctx context.Context, page int, size int) ([]domain.Post, error)
20 SetList(ctx context.Context, page int, size int, posts []domain.Post) error
21 DelList(ctx context.Context, key string) error
22 GetPubList(ctx context.Context, page int, size int) ([]domain.Post, error)
23 SetPubList(ctx context.Context, page int, size int, posts []domain.Post) error
24 DelPubList(ctx context.Context, key string) error
25 GetPub(ctx context.Context, key string) (domain.Post, error)
26 SetPub(ctx context.Context, key string, post domain.Post) error
27 DelPub(ctx context.Context, key string) error
28 SetEmpty(ctx context.Context, key string) error
29 IsEmpty(ctx context.Context, key string) (bool, error)
30}
31
32type postCache struct {
33 client redis.Cmdable

Callers 39

CheckCasbinMethod · 0.65
LogMethod · 0.65
GetMethod · 0.65
QueryDataFunction · 0.65
afterCallbackMethod · 0.65
GetTopCommentsReplyMethod · 0.65
GetTopNMethod · 0.65
GetPostByIdMethod · 0.65
addToBlacklistMethod · 0.65
invalidateSessionMethod · 0.65
CheckLoginMethod · 0.65
PostWithJsonStringFunction · 0.65

Implementers 1

postCacheinternal/repository/cache/post.go

Calls

no outgoing calls

Tested by

no test coverage detected