Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectCache ¶
type ObjectCache interface {
Get() (ret interface{}, err error)
}
type SimpleCache ¶
type SimpleCache struct { MaxSize int // contains filtered or unexported fields }
func NewCache ¶
func NewCache() *SimpleCache
func (SimpleCache) Clear ¶
func (o SimpleCache) Clear()
func (SimpleCache) Get ¶
func (o SimpleCache) Get(key string, builder func() interface{}) (value interface{}, ok bool)
func (SimpleCache) GetOrBuild ¶
func (o SimpleCache) GetOrBuild(key string, builder func() (interface{}, error)) (value interface{}, err error)
func (SimpleCache) Put ¶
func (o SimpleCache) Put(key string, value interface{})
type TimeoutObjectCache ¶
type TimeoutObjectCache struct { Timeout time.Duration Builder func() (interface{}, error) // contains filtered or unexported fields }
func NewObjectCache ¶
func NewObjectCache(builder func() (interface{}, error)) *TimeoutObjectCache
func (*TimeoutObjectCache) Get ¶
func (o *TimeoutObjectCache) Get() (ret interface{}, err error)
Click to show internal directories.
Click to hide internal directories.