Is the default cache setup suitable for production?
production.rb has
# Use a different cache store in production. config.cache_store = :redis_cache_store, {url: ENV.fetch("REDIS_URL", "redis://localhost:6379/1")}
I'm not clear whether that comment is leftover from the default rails environment (which used to use
:memory_store
)Or is this actually still a bad setup?
How about if I'm set up with hatchbox?
Otherwise - what's the best approach for simple production caching on a not-very-big single host site?
For others interested, I was double checking this myself as well.
This tries to access the REDIS_URL env variable first, then if it isn't provided, the second option is a backup default that is used which would be redis://localhost:6379/1
Hatchbox (I'm using the new v2) has the REDIS_URL ENV set. It should override and be used automatically.
*Per:
https://medium.com/rubycademy/the-env-object-6ffa6ed9a63c
This tries to access the REDIS_URL env variable first, then if it isn't provided, the second option is a backup default that is used which would be redis://localhost:6379/1
Hatchbox (I'm using the new v2) has the REDIS_URL ENV set. It should override and be used automatically.
*Per:
https://medium.com/rubycademy/the-env-object-6ffa6ed9a63c
Notifications
You’re not receiving notifications from this thread.