mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
18 lines
284 B
Go
18 lines
284 B
Go
|
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),
|
||
|
}
|
||
|
}
|