Discover Packages
github.com/sakari-ai/moirai
cache
arc
package
Version:
v0.0.0-...-9c44629
Opens a new window with list of versions in this module.
Published: Feb 28, 2020
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func NewCache(size int64 ) *dbCache
type BigCache struct {
Shards int `json:"shards"`
LifeWindowMinutes int `json:"lifeWindowMinutes"`
HardMaxCacheSizeMb int `json:"hardMaxCacheSizeMb"`
MaxEntrySize int `json:"maxEntrySize"`
RefreshInSeconds time .Duration `json:"refreshInSeconds"`
}
type Cache interface {
Get(key interface{}) (value interface{}, ok bool )
Add(key interface{}, value interface{})
Remove(key interface{})
}
func (s *DBCache ) Add(key interface{}, value interface{})
func (s *DBCache ) Get(key interface{}) (value interface{}, ok bool )
func (s *DBCache ) Remove(key interface{})
Source Files
¶
Click to show internal directories.
Click to hide internal directories.