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:
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
|
if attr == 'serializers' && (unsupported = value - CLASSES[klass.to_sym]).length > 0
|
||||||
add_error(I18n.t("#{i18n_key}.unsupported_serializers",
|
add_error(I18n.t("#{i18n_key}.unsupported_serializers",
|
||||||
class: klass,
|
class: klass,
|
||||||
serializers: unsupported.join(", ")
|
serializers: unsupported.join(", ")
|
||||||
))
|
))
|
||||||
end
|
end
|
||||||
|
@ -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
|
||||||
|
|
Laden …
In neuem Issue referenzieren