Documentation ¶
Index ¶
- Variables
- type Cachable
- type Cache
- func (c *Cache) Clean(vs ...Cachable) error
- func (c *Cache) Delete(keys ...string) error
- func (c *Cache) Load(v Cachable) error
- func (c *Cache) MultiRead(newItemFunc func() interface{}, keys ...string) ([]interface{}, error)
- func (c *Cache) MultiWrite(items map[string]interface{}, expires ...int64) error
- func (c *Cache) Read(key string, v interface{}) error
- func (c *Cache) Save(v Cachable, expires ...int64) error
- func (c *Cache) Write(key string, v interface{}, expires ...int64) error
- type Coder
- type Pairs
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCacheMiss = errors.New("cache miss")
ErrCacheMiss missed
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache cache
func (*Cache) MultiRead ¶
MultiRead read multiple items TODO bugfix
Multi Read ALL will always return empty
func (*Cache) MultiWrite ¶
MultiWrite write multiple items
type Coder ¶
type Coder interface { Marshal(v interface{}) ([]byte, error) Unmarshal(data []byte, v interface{}) error }
Coder coder
var Json Coder = &jsonCoder{}
var Jsoniter Coder = jsoniter.ConfigDefault
var Msgpack Coder = &msgpackCoder{}
Click to show internal directories.
Click to hide internal directories.