Use built-in Redis cache store in Rails 5.2
This is required for #64142
Now that GitLab is running Rails 5.2: gitlab-ee!12145 (merged), we should investigate moving over to the built-in Redis cache store that comes with Rails 5.2.
This feature arrived via this change: https://github.com/rails/rails/pull/31134
Highlighted features relevant to GitLab:
- Supports vanilla Redis, hiredis, and Redis::Distributed (required for #64142)
- Supports Memcached-like sharding across Redises with Redis::Distributed (required for #64142)
- Fault tolerant. If the Redis server is unavailable, no exceptions are raised. Cache fetches are treated as misses and writes are dropped.
- Local cache. Hot in-memory primary cache within block/middleware scope. Will this mean we don't need? !30368
Deployment note: Take care to use a dedicated Redis cache rather than pointing this at your existing Redis server. It won't cope well with mixed usage patterns and it won't expire cache entries by default.
This may complicate the deployment of this change.
Related to #64791