โ Ruby on Rails learning pathRuby on Rails ยท Module 9 of 10
Background jobs, mail and caching
Do slow work outside the request and speed pages up.
๐ Key ideas
- Active Job runs work in the background (Solid Queue or Sidekiq).
- Action Mailer sends emails; deliver_later uses a job.
- Cache fragments with <% cache product do %>.
- Rails.cache stores computed values (Solid Cache, Redis, Memcached).
- Action Cable adds WebSockets for live updates.
๐ก Real-life example: Like a restaurant: the waiter takes your order quickly, and the kitchen cooks in the background while you wait at the table.
Active JobBackground job framework
Action MailerSends emails
deliver_laterSend an email through a job
Fragment cacheCached part of a page