Documentation ¶
Index ¶
- type Item
- type MemCache
- func (m *MemCache) Add(k string, x interface{}) error
- func (m *MemCache) Delete(k string)
- func (m *MemCache) Flush()
- func (m *MemCache) Get(k string) (interface{}, bool)
- func (m *MemCache) ItemCount() int
- func (m *MemCache) Items() map[string]Item
- func (m *MemCache) Replace(k string, x interface{}) error
- func (m *MemCache) Set(k string, x interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemCache ¶
type MemCache struct {
// contains filtered or unexported fields
}
MemCache 内存缓存结构
func (*MemCache) Add ¶
Add an item to the MemCache only if an item doesn't already exist for the given
func (*MemCache) Delete ¶
Delete an item from the MemCache. Does nothing if the key is not in the MemCache.
func (*MemCache) Get ¶
Get an item from the MemCache. Returns the item or nil, and a bool indicating whether the key was found.
func (*MemCache) ItemCount ¶
ItemCount Returns the number of items in the MemCache. This may include items that have
Click to show internal directories.
Click to hide internal directories.