Reduce the number of STS requests when using S3 cache adapter with Assume Role authentication
When using S3 cache adapter, especially in AWS, one can use Assume Role method to dynamically get the token that's used to generate presigned URLs or get the goCloudURL. The problem is that this operation is done on the runner manager each time when a job wants to read or write cache. With higher number of jobs that are using cache, that may cause the S3 adapter to fail on the IMDS or STS communication, which we recently have discovered on the Dedicated Runners. Given that with Assume Role, all workers will anyway use the same IAM Role attached to the runner manager instance, we could and should cache the generated dynamic credentials for the time of those being valid. That will reduce the pressure on IMDS and STS.
issue