Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 01:10:28 +01:00
DEV: Add memoization to reduce redis calls
Dieser Commit ist enthalten in:
Ursprung
e7ab0f7143
Commit
298c083624
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
|
@ -90,7 +90,7 @@ class ::CustomWizard::CustomField
|
|||
|
||||
if attr == 'serializers' && (unsupported = value - CLASSES[klass.to_sym]).length > 0
|
||||
add_error(I18n.t("#{i18n_key}.unsupported_serializers",
|
||||
class: klass,
|
||||
class: klass,
|
||||
serializers: unsupported.join(", ")
|
||||
))
|
||||
end
|
||||
|
@ -140,7 +140,7 @@ class ::CustomWizard::CustomField
|
|||
end
|
||||
|
||||
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|
|
||||
create_from_store(record).as_json.with_indifferent_access
|
||||
end
|
||||
|
|
Laden …
In neuem Issue referenzieren