I currently have a rails app that uses the traditional caching. cache do
blocks are used to cache slow-rendering partials. This works great for the most part, except for a few pages which take too long to render on the first read.
I d like to move the rendering of these partials to the write-side from the read-side, by rendering in either the model or in sweepers when the underlying data changes. Preferably, this would be in the sweepers that already invalidate the cache keys. Is this a good approach? Is there a "right" way to do this?