enable storage cache for influxdb
This commit is contained in:
parent
9541787622
commit
cd1422cfdb
@ -21,6 +21,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/cadvisor/storage"
|
"github.com/google/cadvisor/storage"
|
||||||
|
"github.com/google/cadvisor/storage/cache"
|
||||||
"github.com/google/cadvisor/storage/influxdb"
|
"github.com/google/cadvisor/storage/influxdb"
|
||||||
"github.com/google/cadvisor/storage/memory"
|
"github.com/google/cadvisor/storage/memory"
|
||||||
)
|
)
|
||||||
@ -61,6 +62,7 @@ func NewStorageDriver(driverName string) (storage.StorageDriver, error) {
|
|||||||
// TODO(monnand): One hour? Or user-defined?
|
// TODO(monnand): One hour? Or user-defined?
|
||||||
1*time.Hour,
|
1*time.Hour,
|
||||||
)
|
)
|
||||||
|
storageDriver = cache.MemoryCache(*argHistoryDuration, *argHistoryDuration, storageDriver)
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("Unknown database driver: %v", *argDbDriver)
|
err = fmt.Errorf("Unknown database driver: %v", *argDbDriver)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user