rails/rails — pull request #13193 by ismaelga (2013-12-05 15:16:43+00:00)
Title: update cache on background thread when race_condition_ttl option set

Currently the `Cache#fetch` method has a `race_condition_ttl` option which kinda fakes hit with stale data while the the cache is updated by other. But.... There will be a poor request that must wait for the cache to be updated while others are simply reading the _cool_ stale data. So I think we could also give that request the stale data while we update the cache in the background...

I think it makes sense to do this. So just submitted this PR :)
Probably not the best solution but this is just a WIP that probably someone else could take and make it better.

btw First PR to Rails :tada: