0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

DEV: Add memoization to reduce redis calls

Dieser Commit ist enthalten in:
jumagura 2023-06-19 16:52:20 -04:00
Ursprung e7ab0f7143
Commit 298c083624

Datei anzeigen

@ -140,7 +140,7 @@ class ::CustomWizard::CustomField
end end
def self.cached_list def self.cached_list
::CustomWizard::Cache.wrap(LIST_CACHE_KEY) do @cached_list ||= ::CustomWizard::Cache.wrap(LIST_CACHE_KEY) do
PluginStoreRow.where(plugin_name: NAMESPACE).map do |record| PluginStoreRow.where(plugin_name: NAMESPACE).map do |record|
create_from_store(record).as_json.with_indifferent_access create_from_store(record).as_json.with_indifferent_access
end end