From 048a90a150da63900c1ccfda7bf35a09eb8e38fa Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Fri, 26 Feb 2021 12:24:55 +0000 Subject: [PATCH] Reduce cache expiry Reduce cache expiry to help support issues where a function may be scaled down by a user, when it is still in use. The 5s cache meant that all requests would fail until the expiry. The 250ms setting is a 20x reduction. Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- gateway/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/main.go b/gateway/main.go index a9e1f516c..1c458e52d 100644 --- a/gateway/main.go +++ b/gateway/main.go @@ -144,7 +144,7 @@ func main() { MaxPollCount: uint(1000), SetScaleRetries: uint(20), FunctionPollInterval: time.Millisecond * 100, - CacheExpiry: time.Second * 5, // freshness of replica values before going stale + CacheExpiry: time.Millisecond * 250, // freshness of replica values before going stale ServiceQuery: externalServiceQuery, }