Set default reconnect_attempts of Rails.cache to 1

What does this MR do?

Set default reconnect_attempts of Rails.cache to 1

RedisCacheStore defaults to 0 but we need this to be 1 because Redis connections need to reconnect after a fork so that forked processes don't use the same socket

This problem was introduced when we switched to RedisCacheStore because Rails explicitly sets the default to 0. The default value in the redis client is 1.

Previously we used RedisStore, and it didn't set any default value. Resulting to the redis client default being used.

Closes #196057 (closed) and #121670 (closed)


Does this MR meet the acceptance criteria?


Availability and Testing


If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by James Edwards-Jones