Class: Monologue::Admin::CacheController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/monologue/admin/cache_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



12
13
14
15
16
# File 'app/controllers/monologue/admin/cache_controller.rb', line 12

def destroy
  Monologue::TotalSweeper.wipe_all
  flash.notice = I18n.t("monologue.admin.cache.show.cache_wiped")
  render :show
end

#showObject



4
5
6
7
8
9
10
# File 'app/controllers/monologue/admin/cache_controller.rb', line 4

def show
  if ActionController::Base.perform_caching && Monologue::PageCache.enabled && Monologue::PageCache.wipe_enabled &&  ActionController::Base.page_cache_directory != Rails.public_path
    render :show
  else
    render :how_to_enable
  end
end