-
-
Save levicole/a8fed64fb9d1ab94e68c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :cache do | |
desc "Clear memcache (no-op for cold deploys)" | |
task :clear, :roles => :app do | |
# for cold deploys current_path does not exist, but there is no cached content yet so skip it. | |
run "([ -d #{current_path} ] && cd #{current_path} && bundle exec rake RAILS_ENV=#{rails_env} cache:clear) || echo 'Not clearing cache since current_path is not defined, therefore there is no cache'" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment