cache

package
v0.0.0-...-ded0ebf Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotExist = redis.Nil

Functions

This section is empty.

Types

type RedisUserCache

type RedisUserCache struct {
	// contains filtered or unexported fields
}

func (*RedisUserCache) Del

func (c *RedisUserCache) Del(ctx context.Context, id int64) error

func (*RedisUserCache) Get

func (c *RedisUserCache) Get(ctx context.Context, uid int64) (domain.User, error)

func (*RedisUserCache) Set

func (c *RedisUserCache) Set(ctx context.Context, du domain.User) error

type UserCache

type UserCache interface {
	Get(ctx context.Context, uid int64) (domain.User, error)
	Set(ctx context.Context, du domain.User) error
	Del(ctx context.Context, id int64) error
}

func NewUserCache

func NewUserCache(cmd redis.Cmdable) UserCache

Directories

Path Synopsis
Package cachemocks is a generated GoMock package.
Package cachemocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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