Skip to content

Instantly share code, notes, and snippets.

@oniram88
Created June 25, 2019 10:59
Show Gist options
  • Save oniram88/aec5f68ca7991dd073369160f7db04c4 to your computer and use it in GitHub Desktop.
Save oniram88/aec5f68ca7991dd073369160f7db04c4 to your computer and use it in GitHub Desktop.
Simple Rake Task to clear Alchemy cache after deploy new site templates
namespace :alchemy do
namespace :cache do
desc "Complete Clear the cache of all pages"
task full_clear: [:environment] do
Alchemy::Language.published.each do |l|
l.pages.flushables.update_all(published_at: Time.current)
l.pages.flushable_layoutpages.update_all(published_at: Time.current)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment