gcache

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 9 Imported by: 0

README

gcache

golang redis cache client

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigCache added in v1.0.2

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

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * BigCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*BigCache) Get added in v1.0.2

func (s *BigCache) Get(key string, dest interface{}) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*BigCache) Remove added in v1.0.2

func (s *BigCache) Remove(keys ...string) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 删除数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*BigCache) Set added in v1.0.2

func (s *BigCache) Set(key string, dest interface{}, second int) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 添加数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type CacheData

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

type ICache

type ICache interface {
	Get(key string, dest interface{}) error
	Set(key string, dest interface{}, second int) error
	Remove(keys ...string) error
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * ICache接口 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NewBigCache added in v1.0.2

func NewBigCache(timeout int, prefix string) ICache

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化BigCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NewRedisCache

func NewRedisCache(ip string, port int, password string, db, timeout int, prefix string, args ...bool) ICache

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化RedisCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type IPack

type IPack interface {
	Marshal(dest interface{}) ([]byte, error)
	Unmarshal(data []byte, dest interface{}) error
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * ICache接口 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NewMessagePack

func NewMessagePack() IPack

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化messagePack * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type LocalCache

type LocalCache struct {
	sync.Mutex
	// contains filtered or unexported fields
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * LocalCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func NewLocalCache

func NewLocalCache(maxLength int, expiration time.Duration) *LocalCache

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化LocalCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*LocalCache) Get

func (s *LocalCache) Get(key string, dest interface{}) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*LocalCache) Len

func (s *LocalCache) Len() int

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取缓存长度 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*LocalCache) Remove

func (s *LocalCache) Remove(keys ...string) bool

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 删除数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*LocalCache) Set

func (s *LocalCache) Set(key string, dest interface{}, second int) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 添加数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

type RedisCache

type RedisCache struct {
	Redis gredis.IRedis
	// contains filtered or unexported fields
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * RedisCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*RedisCache) Get

func (s *RedisCache) Get(key string, dest interface{}) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*RedisCache) Remove

func (s *RedisCache) Remove(keys ...string) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 删除数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func (*RedisCache) Set

func (s *RedisCache) Set(key string, dest interface{}, second int) error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 添加数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Jump to

Keyboard shortcuts

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