Skip to content

Commit

Permalink
Place /stats routes behind login check, for performance reasons
Browse files Browse the repository at this point in the history
await approval in #9002, but this is a pretty simple change!
  • Loading branch information
jywarren authored Apr 20, 2021
1 parent bd0bc11 commit cf0c0e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/stats_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
class StatsController < ApplicationController
before_action :require_user, only: %i(index range notes wikis users questions comments tags)

def subscriptions
@tags = Rails.cache.fetch("stats-subscriptions-query", expires_in: 24.hours) do
TagSelection
Expand Down

0 comments on commit cf0c0e1

Please sign in to comment.