From cbbddf9ffe572ab8f9e92e05ad65ad144dec2aae Mon Sep 17 00:00:00 2001 From: "Stanko K.R." Date: Tue, 9 Dec 2025 17:26:22 +0100 Subject: [PATCH] Add cache directives --- .../cards/comments/reactions/_reaction.json.jbuilder | 10 ++++++---- app/views/cards/steps/_step.json.jbuilder | 4 +++- app/views/columns/_column.json.jbuilder | 6 ++++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/views/cards/comments/reactions/_reaction.json.jbuilder b/app/views/cards/comments/reactions/_reaction.json.jbuilder index 2c743b7c9..e83dd3e4d 100644 --- a/app/views/cards/comments/reactions/_reaction.json.jbuilder +++ b/app/views/cards/comments/reactions/_reaction.json.jbuilder @@ -1,5 +1,7 @@ -json.(reaction, :id, :content) -json.reacter do - json.partial! "users/user", user: reaction.reacter +json.cache! reaction do + json.(reaction, :id, :content) + json.reacter do + json.partial! "users/user", user: reaction.reacter + end + json.url card_comment_reaction_url(reaction.comment.card, reaction.comment, reaction) end -json.url card_comment_reaction_url(reaction.comment.card, reaction.comment, reaction) diff --git a/app/views/cards/steps/_step.json.jbuilder b/app/views/cards/steps/_step.json.jbuilder index 6cf500791..ac0d5a1f8 100644 --- a/app/views/cards/steps/_step.json.jbuilder +++ b/app/views/cards/steps/_step.json.jbuilder @@ -1 +1,3 @@ -json.(step, :id, :content, :completed) +json.cache! step do + json.(step, :id, :content, :completed) +end diff --git a/app/views/columns/_column.json.jbuilder b/app/views/columns/_column.json.jbuilder index 355a62606..5bb56bdd6 100644 --- a/app/views/columns/_column.json.jbuilder +++ b/app/views/columns/_column.json.jbuilder @@ -1,2 +1,4 @@ -json.(column, :id, :name, :color) -json.created_at column.created_at.utc +json.cache! column do + json.(column, :id, :name, :color) + json.created_at column.created_at.utc +end