Documentation ¶
Index ¶
- Variables
- func NewRamCacheClient() cache.Cache
- type RamCacheClient
- func (rcc *RamCacheClient) Close()
- func (rcc *RamCacheClient) Del(keys ...string) error
- func (rcc *RamCacheClient) Get(key string) (data string, err error)
- func (rcc *RamCacheClient) HDel(key string, fields ...string) error
- func (rcc *RamCacheClient) HGet(key, field string) (string, error)
- func (rcc *RamCacheClient) HGetAll(key string) (map[string]string, error)
- func (rcc *RamCacheClient) HSet(key string, values ...interface{}) error
- func (rcc *RamCacheClient) Set(key string, value interface{}, expiration time.Duration) error
- func (rcc *RamCacheClient) SetOneDay(key string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Nil = errors.New("cache:nil") KeyNull = errors.New("key is null") ValueNull = errors.New("value is null") FieldNull = errors.New("field is null") HashSetFieldTypeError = errors.New("hash set field's type is not string") FieldValueNumberError = errors.New("hash set field and value number is fault") )
Functions ¶
func NewRamCacheClient ¶
Types ¶
type RamCacheClient ¶
type RamCacheClient struct {
// contains filtered or unexported fields
}
func (*RamCacheClient) Close ¶
func (rcc *RamCacheClient) Close()
func (*RamCacheClient) Del ¶
func (rcc *RamCacheClient) Del(keys ...string) error
func (*RamCacheClient) HGetAll ¶
func (rcc *RamCacheClient) HGetAll(key string) (map[string]string, error)
func (*RamCacheClient) HSet ¶
func (rcc *RamCacheClient) HSet(key string, values ...interface{}) error
func (*RamCacheClient) Set ¶
func (rcc *RamCacheClient) Set(key string, value interface{}, expiration time.Duration) error
func (*RamCacheClient) SetOneDay ¶
func (rcc *RamCacheClient) SetOneDay(key string, value interface{}) error
Click to show internal directories.
Click to hide internal directories.