Documentation
¶
Index ¶
- func NewInteractiveRedisCache(client redis.Cmdable) cache.InteractiveCache
- type InteractiveRedisCache
- func (i *InteractiveRedisCache) BatchSet(ctx context.Context, biz string, bizIDs []int64, intr []domain.Interactive) error
- func (i *InteractiveRedisCache) DecrCollectCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) DecrLikeCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) DecrLikeRank(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) Get(ctx context.Context, biz string, bizID int64) (domain.Interactive, error)
- func (i *InteractiveRedisCache) GetTopLikedIDs(ctx context.Context, biz string, limit int64) ([]int64, error)
- func (i *InteractiveRedisCache) IncrCollectCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) IncrLikeCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) IncrLikeRank(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) IncrReadCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) MustBatchGet(ctx context.Context, biz string, bizIDs []int64) ([]domain.Interactive, error)
- func (i *InteractiveRedisCache) Set(ctx context.Context, biz string, bizID int64, intr domain.Interactive) error
- func (i *InteractiveRedisCache) SetLikeToZSET(ctx context.Context, biz string, bizId int64, likeCnt int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInteractiveRedisCache ¶
func NewInteractiveRedisCache(client redis.Cmdable) cache.InteractiveCache
Types ¶
type InteractiveRedisCache ¶
type InteractiveRedisCache struct { cache.BaseInteractiveCache // contains filtered or unexported fields }
func (*InteractiveRedisCache) BatchSet ¶
func (i *InteractiveRedisCache) BatchSet( ctx context.Context, biz string, bizIDs []int64, intr []domain.Interactive, ) error
BatchSet implements cache.InteractiveCache.
func (*InteractiveRedisCache) DecrCollectCntIfPresent ¶
func (i *InteractiveRedisCache) DecrCollectCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
DecrCollectCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) DecrLikeCntIfPresent ¶
func (i *InteractiveRedisCache) DecrLikeCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
DecrLikeCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) DecrLikeRank ¶
DecrLikeRank implements cache.InteractiveCache.
func (*InteractiveRedisCache) Get ¶
func (i *InteractiveRedisCache) Get( ctx context.Context, biz string, bizID int64, ) (domain.Interactive, error)
Get implements cache.InteractiveCache.
func (*InteractiveRedisCache) GetTopLikedIDs ¶
func (i *InteractiveRedisCache) GetTopLikedIDs( ctx context.Context, biz string, limit int64, ) ([]int64, error)
GetTopLikedIDs implements cache.InteractiveCache.
func (*InteractiveRedisCache) IncrCollectCntIfPresent ¶
func (i *InteractiveRedisCache) IncrCollectCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
IncrCollectorCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) IncrLikeCntIfPresent ¶
func (i *InteractiveRedisCache) IncrLikeCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
IncrLikeCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) IncrLikeRank ¶
IncrLikeRank implements cache.InteractiveCache.
func (*InteractiveRedisCache) IncrReadCntIfPresent ¶
func (i *InteractiveRedisCache) IncrReadCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
IncrReadCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) MustBatchGet ¶
func (i *InteractiveRedisCache) MustBatchGet( ctx context.Context, biz string, bizIDs []int64, ) ([]domain.Interactive, error)
BatchGet implements cache.InteractiveCache.
func (*InteractiveRedisCache) Set ¶
func (i *InteractiveRedisCache) Set( ctx context.Context, biz string, bizID int64, intr domain.Interactive, ) error
Set implements cache.InteractiveCache.
func (*InteractiveRedisCache) SetLikeToZSET ¶
func (i *InteractiveRedisCache) SetLikeToZSET( ctx context.Context, biz string, bizId int64, likeCnt int64, ) error
SetLikeToZSET implements cache.InteractiveCache.
Click to show internal directories.
Click to hide internal directories.