Versions in this module Expand all Collapse all v0 v0.0.2 Dec 22, 2023 v0.0.1 Dec 19, 2023 Changes in this version + var DefaultL1Expiration = 10 + var DefaultL1Size = 100 * 1024 * 1024 + var DefaultL2Expiration int32 = 300 + var ErrNotFound = errors.New("key not found in cache") + var None = &NoneCache + type Cache interface + Invalidate func(key string) (err error) + Use func(key string, getter func() (interface{}, error), result interface{}) (err error) + type CacheConfig struct + L1Expiration int + L1Size int + L2Expiration int32 + L2MemcacheUrls []string + type Item struct + Key string + Value []byte + type LayeredCache struct + Debug bool + func New(config *CacheConfig) (result *LayeredCache) + func (this *LayeredCache) Get(key string) (item Item, err error) + func (this *LayeredCache) Invalidate(key string) (err error) + func (this *LayeredCache) Set(key string, value []byte) + func (this *LayeredCache) Use(key string, getter func() (interface{}, error), result interface{}) (err error) + type NoneCache struct + func (this *NoneCache) Invalidate(key string) (err error) + func (this *NoneCache) Use(key string, getter func() (interface{}, error), result interface{}) (err error)