redis

package
v0.0.0-...-1493fe1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

*

*Created by Xie Jian on 2019/10/24 16:01

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultKey = "gotilCacheRedis"
)

Functions

func NewRedisCache

func NewRedisCache() cache.Cache

Types

type Cache

type Cache struct {
	DbNum    int    `json:"dbNum"`
	Key      string `json:"key"`
	Host     string `json:"host"`
	Port     string `json:"port"`
	Password string `json:"password"`
	// contains filtered or unexported fields
}

func (*Cache) ClearAll

func (rc *Cache) ClearAll() error

func (*Cache) Delete

func (rc *Cache) Delete(key string) error

func (*Cache) Get

func (rc *Cache) Get(key string) interface{}

func (*Cache) GetMulti

func (rc *Cache) GetMulti(keys []string) []interface{}

func (*Cache) IsExist

func (rc *Cache) IsExist(key string) bool

func (*Cache) Put

func (rc *Cache) Put(key string, val interface{}, timeout time.Duration) error

func (*Cache) StartCache

func (rc *Cache) StartCache(config string) error

StartCache 调用redis

Jump to

Keyboard shortcuts

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