# Remove all cached data using a single statement

**URL:** <https://www.ruby-forum.com/t/remove-all-cached-data-using-a-single-statement/178033>\
**Category:** Rails\
**Created:** [October 28, 2009, 11:19am UTC](https://www.ruby-forum.com/t/remove-all-cached-data-using-a-single-statement/178033 "2009-10-28T11:19:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajaonchat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ajaonchat](https://www.ruby-forum.com/u/ajaonchat)\
**Post date:** [October 28, 2009, 11:19am UTC](https://www.ruby-forum.com/t/remove-all-cached-data-using-a-single-statement/178033/1 "2009-10-28T11:19:51Z")

</div>

on this forum lot of people calling controller methods in rake task to  
remove cache some one trying to remove directories to and sub  
directories for removing cached content…

this statement can be used as cron job “rake tmp:cache:clear” this  
statement will remove all cached content of any type of rails cache like  
fragment, action,page caching.
