preheat
preheat copied to clipboard
Add support for Action Caching
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)