Created
September 3, 2021 18:56
-
-
Save vilusa/ca5ba365d68240ac86dfb1e907009b68 to your computer and use it in GitHub Desktop.
Rails Redis Cache Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For TLS Connections | |
config.cache_store = :redis_cache_store, { | |
url: ENV.fetch('CACHE_STORE_REDIS_TLS_URL') { ENV['CACHE_STORE_REDIS_URL'] || 'redis://127.0.0.1:6379' }, | |
db: 0, | |
connect_timeout: 20, # Defaults to 20 seconds | |
read_timeout: 1, # Defaults to 1 second | |
write_timeout: 1, # Defaults to 1 second | |
reconnect_delay: 1.5 , | |
reconnect_delay_max: 10.0, | |
reconnect_attempts: 10, # Defaults to 0 | |
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE }, | |
expires_in: 12.hours, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE },
this line specifically fixed my issue on heroku.