diff options
author | multiple creatures <multiple_creatures@monsterware.dev> | 2020-01-17 10:36:42 +0000 |
---|---|---|
committer | multiple creatures <multiple_creatures@monsterware.dev> | 2020-01-17 10:36:42 +0000 |
commit | d2acdf2ea68dce252e827041d226d4402369669b (patch) | |
tree | c4c8acbd7b1b745aadeb60547639f341fd7d7da8 /app/controllers/api/v1/instances | |
parent | 753d06495189dd6ffd95ea91028cc2a03866e974 (diff) | |
parent | 7b4381b4bdd2e3535b907abfe5f5ffa702d692aa (diff) |
Merge pull request 'Port CacheConcern from upstream to define render_with_cache' (#13) from blueraccoon/port-cacheconcern into master
Reviewed-on: https://monsterware.dev/monsterpit/mastodon/pulls/13
Diffstat (limited to 'app/controllers/api/v1/instances')
-rw-r--r-- | app/controllers/api/v1/instances/activity_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/api/v1/instances/peers_controller.rb | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/api/v1/instances/activity_controller.rb b/app/controllers/api/v1/instances/activity_controller.rb index 09edfe365..d0080c5c2 100644 --- a/app/controllers/api/v1/instances/activity_controller.rb +++ b/app/controllers/api/v1/instances/activity_controller.rb @@ -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 diff --git a/app/controllers/api/v1/instances/peers_controller.rb b/app/controllers/api/v1/instances/peers_controller.rb index 93c4c45af..bb04e604d 100644 --- a/app/controllers/api/v1/instances/peers_controller.rb +++ b/app/controllers/api/v1/instances/peers_controller.rb @@ -7,7 +7,8 @@ class Api::V1::Instances::PeersController < Api::BaseController respond_to :json def index - render_cached_json('api:v1:instances:peers:index', expires_in: 1.day) { actively_federated_domains } + expires_in 1.day, public: true + render_with_cache(expires_in: 1.day) { actively_federated_domains } end private |