Skip to content

Commit

Permalink
Cache auth#show endpoints, except for the auth root
Browse files Browse the repository at this point in the history
  • Loading branch information
cavis committed Nov 8, 2023
1 parent 366d0e1 commit 3918921
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/controllers/api/authorizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ class Api::AuthorizationsController < Api::BaseController
def resource
authorization
end

# this is the only auth#show endpoint not cached, since it's specific to a user
def cache_show?
false
end
end
2 changes: 1 addition & 1 deletion app/controllers/concerns/api_authenticated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def authenticate_user!
end

def cache_show?
false
true
end

def cache_index?
Expand Down

0 comments on commit 3918921

Please sign in to comment.