Bust Content Cache after updation of Settings (#14255)

* bust content cache after settings update on admin

* removed bust_content_change_cache from the action
This commit is contained in:
Keshav Biswa 2021-07-19 13:50:59 +05:30 committed by GitHub
parent d185790eed
commit 247e1c48f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,8 @@
module Admin
module Settings
class GeneralSettingsController < Admin::Settings::BaseController
after_action :bust_content_change_caches, only: %i[create]
SPECIAL_PARAMS_TO_ADD = %w[
credit_prices_in_cents
meta_keywords
@ -10,7 +12,6 @@ module Admin
result = ::Settings::General::Upsert.call(settings_params)
if result.success?
Audit::Logger.log(:internal, current_user, params.dup)
bust_content_change_caches
redirect_to admin_config_path, notice: "Successfully updated settings."
else
redirect_to admin_config_path, alert: "😭 #{result.errors.to_sentence}"