From bd4d49d42d0c2aa109bf95057d57b8986697fae3 Mon Sep 17 00:00:00 2001 From: kpacha Date: Tue, 8 Nov 2022 18:48:10 +0100 Subject: [PATCH] fix cachettl type Signed-off-by: kpacha --- config/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/parser.go b/config/parser.go index f9dba26fb..f0a5e5ae3 100644 --- a/config/parser.go +++ b/config/parser.go @@ -240,7 +240,7 @@ type parseableEndpointConfig struct { Backend []*parseableBackend `json:"backend"` ConcurrentCalls int `json:"concurrent_calls"` Timeout string `json:"timeout"` - CacheTTL int `json:"cache_ttl"` + CacheTTL string `json:"cache_ttl"` QueryString []string `json:"input_query_strings"` ExtraConfig *ExtraConfig `json:"extra_config,omitempty"` HeadersToPass []string `json:"input_headers"` @@ -253,7 +253,7 @@ func (p *parseableEndpointConfig) normalize() *EndpointConfig { Method: p.Method, ConcurrentCalls: p.ConcurrentCalls, Timeout: parseDuration(p.Timeout), - CacheTTL: time.Duration(p.CacheTTL) * time.Second, + CacheTTL: parseDuration(p.CacheTTL), QueryString: p.QueryString, HeadersToPass: p.HeadersToPass, OutputEncoding: p.OutputEncoding,