internal/middleware: fix bug when downgrading cache logs
The logic to downgrade error logs on cache timeout is fixed to use the
correct context.
Updates b/144026230
CI-Result: Cloud Build
@@ -147,7 +147,7 @@ func (c *cache) get(ctx context.Context, key string) (io.Reader, bool) {
}
if err != nil {
select {
- case <-ctx.Done():
+ case <-getCtx.Done():
log.Infof("cache get: context timed out")
default:
log.Errorf("cache get: %v", err)
