diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-23 18:56:30 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-23 19:00:43 +0100 |
commit | 79a01358698ad3889b0c9a43cfb2f886fbae77e4 (patch) | |
tree | b687636c1179a0c831acbbe10d8342a8c8f2e6b4 /app/controllers/api/v1/statuses_controller.rb | |
parent | 2112a81e869fe342d7351b1fb1951df754a5d255 (diff) |
Cache accounts/:id/statuses and single statuses too
Diffstat (limited to 'app/controllers/api/v1/statuses_controller.rb')
-rw-r--r-- | app/controllers/api/v1/statuses_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index 2e0399301..a693ce00d 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -9,6 +9,8 @@ class Api::V1::StatusesController < ApiController respond_to :json def show + cached = Rails.cache.read(@status.cache_key) + @status = cached unless cached.nil? end def context |