Documentation ¶
Index ¶
- func Deserialization(byt []byte, ptr interface{}) (err error)
- func Serialization(value interface{}) ([]byte, error)
- type Cache
- func (c Cache) Delete(keys ...interface{}) (bool, error)
- func (c Cache) Exist(key string) (bool, error)
- func (c Cache) Expire(key string, lifeTime int64) error
- func (c Cache) Get(key string, v interface{}) error
- func (c Cache) Incr(key string) (int, error)
- func (c Cache) Set(key string, v interface{}, expire int64) error
- type CacheIFace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialization ¶
func Serialization ¶
Types ¶
type CacheIFace ¶
type CacheIFace interface { Set(key string, v interface{}, expire int64) error Get(name string, v interface{}) error Exist(name string) (bool, error) Incr(name string) (int, error) Expire(name string, newSecondsLifeTime int64) error Delete(keys ...interface{}) (bool, error) }
func NewCache ¶
func NewCache(conn redis.Conn) CacheIFace
Click to show internal directories.
Click to hide internal directories.