Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheLayer ¶
type CacheLayer struct {
// contains filtered or unexported fields
}
func New ¶
func New(freshTime, lifeTime time.Duration) *CacheLayer
func (*CacheLayer) Clear ¶
func (l *CacheLayer) Clear()
func (*CacheLayer) ClearIfNilErr ¶
func (l *CacheLayer) ClearIfNilErr(err error) error
func (*CacheLayer) Get ¶
func (l *CacheLayer) Get(key string, output interface{}, fetchFn FetchFunc) error
func (*CacheLayer) SetDebugLogger ¶
func (l *CacheLayer) SetDebugLogger(logger DebugLogger)
func (*CacheLayer) SetStoreOriginData ¶
func (l *CacheLayer) SetStoreOriginData()
SetStoreOriginData in store origin mode, you should not change cache item's value at any time
type DebugLogger ¶
Click to show internal directories.
Click to hide internal directories.