From 12bf3856c11785823a0031bac6de8fe065cc6005 Mon Sep 17 00:00:00 2001 From: kikito Date: Mon, 7 Sep 2015 13:15:56 +0200 Subject: [PATCH] adds a capistrano task to clear memcached easily --- lib/capistrano/tasks/cache.cap | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/capistrano/tasks/cache.cap diff --git a/lib/capistrano/tasks/cache.cap b/lib/capistrano/tasks/cache.cap new file mode 100644 index 000000000..ce5bf88a2 --- /dev/null +++ b/lib/capistrano/tasks/cache.cap @@ -0,0 +1,12 @@ +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