grafana/pkg/services/cache/cache.go

18 lines
284 B
Go
Raw Normal View History

2018-10-26 03:40:33 -05:00
package cache
import (
"time"
gocache "github.com/patrickmn/go-cache"
)
type CacheService struct {
*gocache.Cache
}
func New(defaultExpiration, cleanupInterval time.Duration) *CacheService {
return &CacheService{
Cache: gocache.New(defaultExpiration, cleanupInterval),
}
}