4 ms·
Basically if one of your controller has more than 10 lines of processing and you don't need to present the data to the user immediately, you can put that into a
by rprime 15y ago
Basically if one of your controller has more than 10 lines of processing and you don't need to present the data to the user immediately, you can put that into a job, for example when a user register, you can add the new record to the database and redirect him, but you can send the welcome email 1-2 minutes late. And for presenting data, yeah, go cache everything, also take a look inside rails partial cache features, for example in a page, even that the results are dynamically generated, you can cache things like categories for example, or the blog post, and retrieve just the comments.