From cd1422cfdbc20d5580e4f3b409bfc396fcba13e5 Mon Sep 17 00:00:00 2001 From: Nan Deng Date: Fri, 8 Aug 2014 11:17:30 -0700 Subject: [PATCH] enable storage cache for influxdb --- storagedriver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storagedriver.go b/storagedriver.go index 3de3f85d..a0e74165 100644 --- a/storagedriver.go +++ b/storagedriver.go @@ -21,6 +21,7 @@ import ( "time" "github.com/google/cadvisor/storage" + "github.com/google/cadvisor/storage/cache" "github.com/google/cadvisor/storage/influxdb" "github.com/google/cadvisor/storage/memory" ) @@ -61,6 +62,7 @@ func NewStorageDriver(driverName string) (storage.StorageDriver, error) { // TODO(monnand): One hour? Or user-defined? 1*time.Hour, ) + storageDriver = cache.MemoryCache(*argHistoryDuration, *argHistoryDuration, storageDriver) default: err = fmt.Errorf("Unknown database driver: %v", *argDbDriver) }