docbrown/config/environments
rhymes 1aee4202d8 Switch external redis_store to Rails supported redis_cache_store (#5282)
`redis_store` was initially introduced to switch sessions from the cookie store to Redis in https://github.com/thepracticaldev/dev.to/pull/4004. When we introduced a dual cache store in https://github.com/thepracticaldev/dev.to/pull/4991 we forgot to use the builtin Rails cache store - [ActiveSupport::Cache::RedisCacheStore](https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-rediscachestore) - and instead kept using the external [ActiveSupport::Cache::RedisStore] which comes from the `redis-activesupport` gem included by `redis-rails`.

The gem `redis-activesupport` contains this disclaimer:

> Rails 5.2.0 includes a Redis cache store out of the box, so you don't really need this anymore if you're generating a new Rails application. We are no longer accepting new features for this gem, only pull requests for security and compatibility fixes will be accepted.

Other reasons to use the Rails builtin cache store, other than being supported and developed are the following:

- supports and uses `hiredis` as a client if installed:

22483b86a6/activesupport/lib/active_support/cache/redis_cache_store.rb (L12-L14)

- supports compressions for keys over 1kb (that can be configured)

- is evolved with Rails itself
2019-12-30 10:34:20 -05:00
..
development.rb Migrate to streaming app shell via serviceworkers (#5020) [deploy] 2019-12-16 12:21:33 -05:00
production.rb Switch external redis_store to Rails supported redis_cache_store (#5282) 2019-12-30 10:34:20 -05:00
test.rb Dispatch events to the webhook endpoints #3715 (#3872) 2019-09-07 13:17:45 -04:00