Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissedCache = errors.New("not in cache")
Functions ¶
This section is empty.
Types ¶
type LocalCache ¶ added in v1.16.0
LocalCache caches the different reports generated by the server
func NewLocalCache ¶ added in v1.16.0
func NewLocalCache(expiration time.Duration) *LocalCache
type MemCache ¶ added in v1.16.0
type MemCache struct {
// contains filtered or unexported fields
}
func NewMemCache ¶ added in v1.16.0
func NewMemCache(m MemCacheClient, expiration time.Duration) *MemCache
type MemCacheClient ¶ added in v1.16.0
type ReportCache ¶ added in v1.16.0
type ReportCache struct { Cache // contains filtered or unexported fields }
func (*ReportCache) MaybeGenerate ¶ added in v1.16.0
func (c *ReportCache) MaybeGenerate(key string, generate func() (*tabulator.Tabulator, error)) (*tabulator.Tabulator, error)
MaybeGenerate loads a report from LocalCache, or generates it if the report does not exist or is expired
func (*ReportCache) Stats ¶ added in v1.16.0
func (c *ReportCache) Stats() map[string]int
Click to show internal directories.
Click to hide internal directories.