From a5ebc282cf61cd09fe0ef11469b779403ad4f592 Mon Sep 17 00:00:00 2001 From: jumagura Date: Wed, 21 Jun 2023 00:33:01 -0400 Subject: [PATCH] DEV: Implement instance-level caching for custom fields --- lib/custom_wizard/custom_field.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/custom_wizard/custom_field.rb b/lib/custom_wizard/custom_field.rb index 6e36c2ee..534953fb 100644 --- a/lib/custom_wizard/custom_field.rb +++ b/lib/custom_wizard/custom_field.rb @@ -216,6 +216,7 @@ class ::CustomWizard::CustomField end def self.invalidate_cache + @cached_list = nil CustomWizard::Cache.new(LIST_CACHE_KEY).delete Discourse.clear_readonly! Discourse.request_refresh!