Sha256: bd8491c05c921b482f0d4116628d0db0f49e36b86ac4df24a69c28376e77e1dd
Contents?: true
Size: 499 Bytes
Versions: 27
Compression:
Stored size: 499 Bytes
Contents
namespace :imagine_cms do namespace :cache do desc "Clear CMS cache (generated .html files)" task :clear => :environment do include ActionDispatch::Routing::UrlFor include Rails.application.routes.url_helpers CmsPage.find_each do |page| ActionController::Base.expire_page url_for(:controller => 'cms/content', :action => 'show', :content_path => page.path, :only_path => true) end puts "Cache cleared." end end end
Version data entries
27 entries across 27 versions & 1 rubygems