Documentation ¶
Index ¶
- Constants
- func GetValueSize(val interface{}) int64
- func ParseSize(size string) (int64, string)
- type MemCache
- func (mc *MemCache) Del(key string) bool
- func (mc *MemCache) Exists(key string) bool
- func (mc *MemCache) Flush() bool
- func (mc *MemCache) Get(key string) (interface{}, bool)
- func (mc *MemCache) Keys() int64
- func (mc *MemCache) Set(key string, val interface{}, expire time.Duration) bool
- func (mc *MemCache) SetMaxMemory(size string) bool
Constants ¶
View Source
const ( B = 1 << (iota * 10) KB MB GB TB )
Variables ¶
This section is empty.
Functions ¶
func GetValueSize ¶
func GetValueSize(val interface{}) int64
Types ¶
type MemCache ¶
type MemCache struct {
// contains filtered or unexported fields
}
func NewMemCache ¶
func NewMemCache() *MemCache
func (*MemCache) SetMaxMemory ¶
SetMaxMemory size 1KB 100KB 1MB 2MB 1GB
Click to show internal directories.
Click to hide internal directories.