0
0
Fork 0

Cache accounts/:id/statuses and single statuses too

This commit is contained in:
Eugen Rochko 2016-11-23 18:56:30 +01:00
parent 2112a81e86
commit 79a0135869
2 changed files with 23 additions and 1 deletions

View file

@ -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