mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: drop fragment cache for flags (#28001)
Flags are stored in the memory of the process and a fragment cache is not necessary.
This commit is contained in:
committed by
GitHub
parent
43aa47b118
commit
f41716d532
@@ -111,17 +111,13 @@ class SiteSerializer < ApplicationSerializer
|
||||
end
|
||||
|
||||
def post_action_types
|
||||
cache_fragment("post_action_types_#{I18n.locale}") do
|
||||
types = ordered_flags(PostActionType.types.values)
|
||||
ActiveModel::ArraySerializer.new(types).as_json
|
||||
end
|
||||
types = ordered_flags(PostActionType.types.values)
|
||||
ActiveModel::ArraySerializer.new(types).as_json
|
||||
end
|
||||
|
||||
def topic_flag_types
|
||||
cache_fragment("post_action_flag_types_#{I18n.locale}") do
|
||||
types = ordered_flags(PostActionType.topic_flag_types.values)
|
||||
ActiveModel::ArraySerializer.new(types, each_serializer: TopicFlagTypeSerializer).as_json
|
||||
end
|
||||
types = ordered_flags(PostActionType.topic_flag_types.values)
|
||||
ActiveModel::ArraySerializer.new(types, each_serializer: TopicFlagTypeSerializer).as_json
|
||||
end
|
||||
|
||||
def default_archetype
|
||||
|
||||
Reference in New Issue
Block a user