Documentation ¶
Index ¶
- type Key
- type Mem
- func (m *Mem) Clear()
- func (m *Mem) Count() int
- func (m *Mem) Delete(k string)
- func (m *Mem) DeleteExpired()
- func (m *Mem) Get(k string) (interface{}, bool)
- func (m *Mem) GetWithExpiration(k string) (interface{}, time.Time, bool)
- func (m *Mem) Init(onEvicted func(string, interface{})) *Mem
- func (m *Mem) Items() map[string]Obj
- func (m *Mem) Load(r io.Reader) error
- func (m *Mem) LoadFile(fname string) error
- func (m *Mem) Replace(k string, x interface{}, d ...time.Duration) error
- func (m *Mem) Save(w io.Writer) (err error)
- func (m *Mem) SaveFile(fname string) error
- func (m *Mem) Set(k string, x interface{}, ttl ...time.Duration)
- type Obj
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mem ¶
type Mem struct {
// contains filtered or unexported fields
}
=> 对象管理器
func (*Mem) GetWithExpiration ¶
Mem.GetWithExpiration 获取对象连带结束时间
func (*Mem) Items ¶
Mem.Items Copies all unexpired items in the memory into a new map and returns it.
Click to show internal directories.
Click to hide internal directories.