diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8b3211ce7b7b323559c216a7e97ce520696defe5..ce8c81040301ea46cc73e07d5a4da8535819618b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -269,6 +269,7 @@ class ApplicationController < ActionController::Base @hot_questions = Rails.cache.fetch('hot_questions', expires_in: 4.hours) do Rack::MiniProfiler.step 'hot_questions: cache miss' do Post.undeleted.where(closed: false) + .where(locked: false) .where(last_activity: (Rails.env.development? ? 365 : 7).days.ago..DateTime.now) .where(post_type_id: [Question.post_type_id, Article.post_type_id]) .joins(:category).where(categories: { use_for_hot_posts: true })