rediscache

package
v0.0.0-...-24b49fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

func (i *InteractiveRedisCache) DecrLikeRank(
	ctx context.Context,
	biz string,
	bizID int64,
) error

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

func (i *InteractiveRedisCache) IncrLikeRank(
	ctx context.Context,
	biz string,
	bizID int64,
) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL