cache

package
v0.0.0-...-66c88e8 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FoodIDToNameKey    = "food_id_%v_to_name"    //food_id
	DiseaseIDToNameKey = "disease_id_%v_to_name" //food_id

	UserLookFreqKey    = "user_look_%v_freq"    //user_id
	UserCommentFreqKey = "user_comment_%v_freq" //user_id
	UserLoginFreqKey   = "user_look_%v_freq"    //user_id
)
View Source
var (
	Client *redis.Client
)

Functions

func CreateOrSetAddOne

func CreateOrSetAddOne(key string, timeout time.Duration) (value int, err error)

func Get

func Get(key string) (value string, err error)

func GetInt

func GetInt(key string) (value int, err error)

func Init

func Init(addr string, password string, db int) error

func Set

func Set(key string, value interface{}, timeout time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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