# Expire cache in rake issue

**URL:** <https://discuss.rubyonrails.org/t/expire-cache-in-rake-issue/54225>\
**Category:** rubyonrails-talk\
**Created:** [September 8, 2010, 1:02pm UTC](https://discuss.rubyonrails.org/t/expire-cache-in-rake-issue/54225 "2010-09-08T13:02:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [September 8, 2010, 1:02pm UTC](https://discuss.rubyonrails.org/t/expire-cache-in-rake-issue/54225/1 "2010-09-08T13:02:14Z")

</div>

I struggled with this problem the other night and managed to come up with solution that allowed me to to use the code from my Sweeper instead of duplicating it in rake. I wrote a blog entry explaining what I did along with code samples.

[http://stevencummings.name/2010/09/07/expire\_fragment-with-rake-and-as-a-model-only-observer](http://stevencummings.name/2010/09/07/expire_fragment-with-rake-and-as-a-model-only-observer)
