Hey everyone, if you've ever written to [craigslist], this question should make sense to you. Whenever you publish a listing (for example, to sell furniture or an apartment), your listing does not immediately hit the site. Rather, lists will be displayed in batches (numbers vary) approximately every 10-15 minutes. At first, I really thought about this behavior, tried to record notes, and then do mass inserts, but I realized that it was much easier. After talking with some colleagues, it made sense that Craigslist caches its pages and then empties this cache every 10-15 minutes. This greatly reduces the load on their database.
Now, to my question. How to do the same in Rails? I know how to implement caching - I read the [caching with Rails guide]. I will use action caching and fragment caching (because I cannot cache the entire page). I still need to do checks and access controls, so I can’t completely cache the page ...
source share