class Admin::CachePurgeController < Admin::ForestController
  def index
    authorize :dashboard, :index?

    logger.info "[Forest] Performing user-issued cache clear"

    Rails.cache.clear

    redirect_to params.delete(:return_to) || admin_path, notice: "Cache has been cleared."
  end
end

class Admin::CachePurgeController < Admin::ForestController
  def index
    authorize :dashboard, :index?

    logger.info "[Forest] Performing user-issued cache clear"

    Rails.cache.clear
    Setting.expire_application_cache_key!

    redirect_to params.delete(:return_to) || admin_path, notice: "Cache has been cleared."
  end
end

Expire application cache key when purging cache from admin screen
Expire application cache key when purging cache from admin screen
