Documentation
¶
Index ¶
- Variables
- func FromConfig(conf *Config) *builder
- func New(shards int, maxSize int64) *builder
- type Cache
- func (c *Cache) Close()
- func (c *Cache) Count() (count int64)
- func (c *Cache) Del(key interface{}) (ok bool)
- func (c *Cache) Get(key interface{}) (value interface{}, err error)
- func (c *Cache) Set(key interface{}, value interface{})
- func (c *Cache) SetExp(key interface{}, value interface{}, ttl time.Duration)
- type Config
- type ICache
- type Kind
- type LoadFunc
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FromConfig ¶
func FromConfig(conf *Config) *builder
Types ¶
type ICache ¶
type ICache interface {
// Set value with default lifetime(optional)
Set(key interface{}, value interface{})
// Set value with custom lifetime time
SetExp(key interface{}, value interface{}, ttl time.Duration)
Get(key interface{}) (value interface{}, err error)
Del(key interface{}) bool
Count() int64
Close()
}
Click to show internal directories.
Click to hide internal directories.