Skip to content
Snippets Groups Projects
Unverified Commit 5dbe1865 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Add cache to custom emojis API (#9732)

Fix #9729
parent 86f27b17
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@ class Api::V1::CustomEmojisController < Api::BaseController
respond_to :json
def index
render json: CustomEmoji.local.where(disabled: false), each_serializer: REST::CustomEmojiSerializer
render_cached_json('api:v1:custom_emojis', expires_in: 1.minute) do
ActiveModelSerializers::SerializableResource.new(CustomEmoji.local.where(disabled: false), each_serializer: REST::CustomEmojiSerializer)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment