Documentation
¶
Overview ¶
Cache access
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ArticleCache ¶
type ArticleCache interface { GetFirstPage(ctx context.Context, uid int64) ([]domain.Article, error) SetFirstPage(ctx context.Context, uid int64, articles []domain.Article) error DelFirstPage(ctx context.Context, uid int64) error Get(ctx context.Context, id int64) (domain.Article, error) Set(ctx context.Context, article domain.Article) error GetPub(ctx context.Context, id int64) (domain.Article, error) SetPub(ctx context.Context, article domain.Article) error }
type BaseArticleCache ¶
type BaseArticleCache struct{}
type BaseCodeCache ¶
type BaseCodeCache struct{}
func (*BaseCodeCache) Key ¶
func (b *BaseCodeCache) Key(biz, phone string) string
type BaseInteractiveCache ¶
type BaseInteractiveCache struct{}
type BaseUserCache ¶
type BaseUserCache struct{}
func (*BaseUserCache) Key ¶
func (c *BaseUserCache) Key(uid int64) string
type InteractiveCache ¶
type InteractiveCache interface { IncrReadCntIfPresent(ctx context.Context, biz string, bizID int64) error IncrLikeCntIfPresent(ctx context.Context, biz string, bizID int64) error DecrLikeCntIfPresent(ctx context.Context, biz string, bizID int64) error IncrCollectCntIfPresent(ctx context.Context, biz string, bizID int64) error DecrCollectCntIfPresent(ctx context.Context, biz string, bizID int64) error Get(ctx context.Context, biz string, bizID int64) (domain.Interactive, error) Set(ctx context.Context, biz string, bizID int64, intr domain.Interactive) error }
Click to show internal directories.
Click to hide internal directories.