cache

package
v0.0.0-...-b401549 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuestionCache

type QuestionCache struct {
	*redis.Redis
	// contains filtered or unexported fields
}

func New

func New(logger *slog.Logger, redis *redis.Redis) *QuestionCache

func (*QuestionCache) GetRandom

func (c *QuestionCache) GetRandom(ctx context.Context) (*models.Question, error)

func (*QuestionCache) Put

func (c *QuestionCache) Put(ctx context.Context, value *models.Question) error

Jump to

Keyboard shortcuts

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