Skip to content

Instantly share code, notes, and snippets.

@erikhansen
Created December 13, 2019 00:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikhansen/f06f0108f92ce164917f02bf336c5e53 to your computer and use it in GitHub Desktop.
Save erikhansen/f06f0108f92ce164917f02bf336c5e53 to your computer and use it in GitHub Desktop.
Rake file to cache apcu cache upon each deployment. Used in conjunction with https://github.com/davidalger/capistrano-magento2#usage
# Clear APCU (unsure if this is necessary, but playing it on the safe side)
after "deploy:published", "cachetool:apcu:clear" do
on release_roles :all do
within release_path do
execute :cachetool, 'apcu:cache:info'
execute :cachetool, 'apcu:cache:clear'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment