Add (back) rails-level JSON caching (#11333)
This commit is contained in:
parent
59fd622adc
commit
c669bb42ba
10 changed files with 64 additions and 50 deletions
|
@ -7,7 +7,8 @@ class Api::V1::Instances::ActivityController < Api::BaseController
|
|||
respond_to :json
|
||||
|
||||
def show
|
||||
render_cached_json('api:v1:instances:activity:show', expires_in: 1.day) { activity }
|
||||
expires_in 1.day, public: true
|
||||
render_with_cache json: :activity, expires_in: 1.day
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue