rails-templates
rails-templates copied to clipboard
Rails Cache
Over the years, we have rarely used caching with Rails. And when we did, it was added afterwards in the life of the project, not at the beginning. But performance-wise, the apps we develop would gain a lot. And in terms of efficiency, it would be easier to develop with caching setup and in mind from the start.
Rails 5.2 improve a lot the built-in cache feature, so I think it's time to revisit this topic.
- Review what's new in Rails caching, especially Redis Cache Store
- Enable caching by default in the Rails Template
- Implement a base application with caching working from the start
Not totally relative to this issue, just want to take a note here, be aware if we want to use Redis for Cache and Sidekiq 😄
@olivierobert based on @andyduong1920's note, it means the infrastructure would need 2 Redis instances. This also means higher infrastructure costs at the project start.
With that in mind, is it still interesting to move forward with this idea? If not, let's close the issue 🙌
Considering caching from the beginning would benefit the product we build. Like localization, it can be added later but it is a bit of a pain in the 🍑 Also, it would also benefit the team to think about performance from the get-go and to know more about caching strategies with Rails 🧠
Granted, it is not a must-have feature for the template. However, having the option to add a redis cache store would be great. Second, when Solid Queue is released, then we would not need to use sidekiq, hence the increased cost concern could be mitigated.
Thanks for your update. 🙏
This story remains interesting and I will consider it for future sprints. Probably starting with a showcase: we need to try the whole implementation and deploy it in the cloud to ensure we have a good mastery of it, before adding it as an optional add-on to the template 🙌