I’ve just set up caching on my site and want to expire some of fragments
an hourly basis.
I was going to use cron and script/runner to do this.
For other fragments that I am expiring, I am using expire_fragment
sweeper class, something like:
class QuestionSweeper < ActionController::Caching::Sweeper
expire_page :controller => ‘xml’, :action => ‘question’, :id =>
expire_fragment :controller => ‘landing’, :action => ‘last_added’,
What I am stumped on is that I want to use script/runner which works on
models, and expire_fragment which works in controllers.
Can someone provide an example of how they would expire the fragment and
it would be called by script/runner?