Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 01:10:28 +01:00
Merge pull request #248 from paviliondev/add-logs
Add memoization to reduce redis calls
Dieser Commit ist enthalten in:
Commit
6e0f10ca0d
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
|
@ -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!
|
||||
|
|
|
@ -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
|
||||
|
|
Laden …
In neuem Issue referenzieren