3 ms·
Thanks! Using delayed job already for certain API calls, but will think about how to use them more. I think I definitely have to look into cacheing.
by ha470 15y ago
Thanks! Using delayed job already for certain API calls, but will think about how to use them more.
I think I definitely have to look into cacheing.
- rprime 15y agoBasically 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.