diff --git a/lib/capistrano/antistatique/cachetool.rb b/lib/capistrano/antistatique/cachetool.rb new file mode 100644 index 0000000..d13b1c0 --- /dev/null +++ b/lib/capistrano/antistatique/cachetool.rb @@ -0,0 +1,3 @@ +require 'capistrano/cachetool' + +load File.expand_path('../../tasks/cachetool.rake', __FILE__) diff --git a/lib/capistrano/tasks/cachetool.rake b/lib/capistrano/tasks/cachetool.rake new file mode 100644 index 0000000..46198fc --- /dev/null +++ b/lib/capistrano/tasks/cachetool.rake @@ -0,0 +1,11 @@ +namespace :cachetool do + namespace :opcache do + task :reset do + on release_roles(fetch(:cachetool_roles)) do + within fetch(:cachetool_working_dir) do + execute :cachetool, "opcache:reset --web --web-path=#{release_path}/web --web-url=#{fetch(:cachetool_reset_web_url)}", raise_on_non_zero_exit: false + end + end + end + end +end \ No newline at end of file