preheat icon indicating copy to clipboard operation
preheat copied to clipboard

Add support for Action Caching

Open mltsy opened this issue 12 years ago • 0 comments

I moved the enable/disable methods into the Preheat module, and added another step in each to mangle/unmamgle the ActionController::Caching::Fragment module that handles all fragment and action caching.

My solution was to make "read_fragment" just return nil within a Preheat.it block, which forces the caching mechanism to re-cache the contents... not sure whether this is the best solution or not, but it does work.

Also made Preheat.it return the return value of the executed block (for convenience)

mltsy avatar Jun 17 '13 23:06 mltsy