title: time-based expiration of cache in Rails?
body: <p>Rails offers several layers of caching: page, action, and fragment. I was surprised that none of these methods offer a time-based expiration of the cache.</p>
  
  <p>I for example am showing a list of "top selling products", which is ranked by number of purchases, for this listing it is good enough for us to refresh the cache once a day. We do not want to refresh the cache every time a purchase is made because that happens hundreds of times a day. </p>
  
  <p>What is a good solution for this scenario?</p>