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) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd) 2021-02-26 12:24:55 +00:00
parent 4bdb580ae7
commit 048a90a150

View File

@ -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,
}