Skip to content

Instantly share code, notes, and snippets.

@miyamae
Last active August 29, 2015 14:10
Show Gist options
  • Save miyamae/87e811dcd6cebdb0e525 to your computer and use it in GitHub Desktop.
Save miyamae/87e811dcd6cebdb0e525 to your computer and use it in GitHub Desktop.
rake tmp:cache:clearが遅いからファイルを消すかわりに/tmpへ移動
namespace :tmp do
namespace :cache do
# desc "Move all files and directories in tmp/cache to /tmp"
task :flush do
FileUtils.mv('tmp/cache', "/tmp/flushed_cache.#{Time.now.to_i}")
FileUtils.mkdir('tmp/cache')
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment