namespace :cache do desc "clears the cache in the servers" task :clear do on roles(:app) do |role| within release_path do with rails_env: fetch(:rails_env) do execute :rake, "cache:clear" end end end end end