From c003e7075880071743af06cfb5865bdb943db024 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 3 Nov 2016 14:12:45 +0100 Subject: [PATCH] Caching should work correctly now (fingers crossed) --- app/views/api/v1/accounts/relationship.rabl | 2 +- app/views/api/v1/accounts/show.rabl | 2 +- app/views/api/v1/statuses/context.rabl | 1 - app/views/api/v1/statuses/show.rabl | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/api/v1/accounts/relationship.rabl b/app/views/api/v1/accounts/relationship.rabl index 4f634877f7..84043e9cd3 100644 --- a/app/views/api/v1/accounts/relationship.rabl +++ b/app/views/api/v1/accounts/relationship.rabl @@ -1,5 +1,5 @@ object @account -cache false + attribute :id node(:following) { |account| @following[account.id] || false } node(:followed_by) { |account| @followed_by[account.id] || false } diff --git a/app/views/api/v1/accounts/show.rabl b/app/views/api/v1/accounts/show.rabl index 6aec6e14de..b7b4d26400 100644 --- a/app/views/api/v1/accounts/show.rabl +++ b/app/views/api/v1/accounts/show.rabl @@ -1,5 +1,5 @@ object @account -cache false +cache attributes :id, :username, :acct, :display_name, :note diff --git a/app/views/api/v1/statuses/context.rabl b/app/views/api/v1/statuses/context.rabl index 24fa403948..0b62f26d55 100644 --- a/app/views/api/v1/statuses/context.rabl +++ b/app/views/api/v1/statuses/context.rabl @@ -1,5 +1,4 @@ object @context -cache false node :ancestors do |context| partial 'api/v1/statuses/index', object: context.ancestors diff --git a/app/views/api/v1/statuses/show.rabl b/app/views/api/v1/statuses/show.rabl index 24493bc3eb..1c586a3a5a 100644 --- a/app/views/api/v1/statuses/show.rabl +++ b/app/views/api/v1/statuses/show.rabl @@ -1,5 +1,5 @@ object @status -cache false +cache extends 'api/v1/statuses/_show'