Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvCacheMaxSize string = "BLUDGEON_CACHE_MAX_SIZE" EnvCacheTimeToLive string = "BLUDGEON_CACHE_TIME_TO_LIVE" EnvCacheDebug string = "BLUDGEON_CACHE_DEBUG" EnvCacheEvictionPolicy string = "BLUDGEON_CACHE_EVICTION_POLICY" )
View Source
const ( DefaultMaxSize int = 50 * 1024 * 1024 //50MB DefaultTimeToLive time.Duration = time.Hour DefaultDebug bool = true DefaultEvictionPolicy stash.EvictionPolicy = stash.LeastFrequentlyUsed )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New() interface { Cache common.Configurer common.Initializer common.Parameterizer }
Types ¶
type Cache ¶
type Cache interface { //CacheWrite can be used to write a change // to an in-memory store Write(id string, v Cacheable) //CacheRead can be used to read a change from // an in-memory store Read(id string, v Cacheable) error //CacheDelete can be used to remove a change from // an in-memory store Delete(id string) }
type Cacheable ¶
type Cacheable interface { encoding.BinaryMarshaler encoding.BinaryUnmarshaler }
type Configuration ¶
type Configuration struct {
stashmemory.Configuration
}
Click to show internal directories.
Click to hide internal directories.