Caching with Redis

I’m looking into using Redis as a cache store for my Rails application. Specifically, this gem:

The Redis URL should be set up in the application as following:

config.cache_store = :redis_store, "redis://localhost:6379/0/cache", { expires_in: 90.minutes }

If I want to use my stand-alone Cloud 66 Redis server as the cache store for any server that I scale, would specifying the URL be as simple as using the following URL Env variable? I want to make sure this would scale across multiple servers.

config.cache_store = :redis_store, "#{ENV["REDIS_URL"]}/0/cache", { expires_in: 90.minutes }

You must be logged in to answer this question