cache

package
v0.0.0-...-cd006e5 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	DeleteLikes(superheroID string) error
	GetChoice(key string) (*model.Choice, error)
	GetChoices(keys []string) (choices []model.Choice, err error)
	GetLikes(superheroID string) ([]string, error)
	GetSuggestions(keys []string) (suggestions []model.Superhero, err error)
	SetSuggestions(suggestions []model.Superhero) error
}

Cache interface defines cache methods.

func New

func New(rc redis.Cmdable, likesKeyFormat string, suggestionKeyFormat string) Cache

New creates a client connection to Redis.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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