cache

package
v0.0.0-...-5318e64 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotExist not found
	ErrNotExist = errors.New("value not exist")
)

Functions

This section is empty.

Types

type Cache

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

Cache redis cache

func New

func New(addr, pwd string) (*Cache, error)

New 创建缓存

func (*Cache) Close

func (c *Cache) Close() error

Close 关闭连接

func (*Cache) Get

func (c *Cache) Get(key string) (string, error)

Get 从缓存中读取

func (*Cache) Set

func (c *Cache) Set(key, vaule string) error

Set 写入

Jump to

Keyboard shortcuts

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