diff --git a/lib/custom_wizard/custom_field.rb b/lib/custom_wizard/custom_field.rb index 29423ec6..e8c69c8e 100644 --- a/lib/custom_wizard/custom_field.rb +++ b/lib/custom_wizard/custom_field.rb @@ -140,7 +140,7 @@ class ::CustomWizard::CustomField end def self.cached_list - ::CustomWizard::Cache.wrap(LIST_CACHE_KEY) do + @custom_wizard_cached_fields ||= ::CustomWizard::Cache.wrap(LIST_CACHE_KEY) do PluginStoreRow.where(plugin_name: NAMESPACE).map do |record| create_from_store(record).as_json.with_indifferent_access end @@ -216,6 +216,7 @@ class ::CustomWizard::CustomField end def self.invalidate_cache + @custom_wizard_cached_fields = nil CustomWizard::Cache.new(LIST_CACHE_KEY).delete Discourse.clear_readonly! Discourse.request_refresh! diff --git a/plugin.rb b/plugin.rb index c2a2578a..5f166ca0 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.4.6 -# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever +# version: 2.4.7 +# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech # subscription_url: https://coop.pavilion.tech