Hi all, I''m trying to expire a cached fragment when a model is updated. The usual way to do this is with a sweeper, but sweepers only work when an action is being called at the same time - I need to expire a cached fragment during some back-end batch process. A normal observer should work, but you don''t have access to the expire_fragment method from there. Adding "include ActionController::Caching::Fragments" in my observer gives me access this method, but re-runs the fragment_cache_store initialise method and resets my config to the default MemoryStore. I have a few options, (such as: copy and paste the expire_fragment method into my observer, reconfig the fragment_cache_store after inclusion, make my batch process make a http call to a controller action to kill the cache), but these all seem pretty ugly. Does anyone know if there is an easier way to get access to this method from within my observer? Thanks, John. -- http://johnleach.co.uk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---