Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("key not found in cache")
View Source
var GlobalCacheExpirationInSec int32 = 600 // 10 min
View Source
var LocalCacheExpirationInSec = 600 // 10 min
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type GlobalCache ¶
type GlobalCache struct {
// contains filtered or unexported fields
}
func NewGlobal ¶
func NewGlobal(urls []string, expiration int32) *GlobalCache
func (*GlobalCache) Invalidate ¶
func (this *GlobalCache) Invalidate()
func (*GlobalCache) Set ¶
func (this *GlobalCache) Set(key string, value []byte)
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func NewLocal ¶
func NewLocal(expiration int) *LocalCache
func (*LocalCache) Invalidate ¶
func (this *LocalCache) Invalidate()
func (*LocalCache) Set ¶
func (this *LocalCache) Set(key string, value []byte)
Click to show internal directories.
Click to hide internal directories.