This commit is contained in:
Albert Yi
2018-10-12 15:17:32 -07:00
parent a85f3773e3
commit e133a598a3
2 changed files with 12 additions and 6 deletions

View File

@@ -3,6 +3,11 @@ class CountsController < ApplicationController
rescue_from Post::TimeoutError, with: :rescue_exception
def posts
@count = Post.fast_count(params[:tags], raise_on_timeout: true)
@count = Post.fast_count(
params[:tags],
timeout: CurrentUser.statement_timeout,
raise_on_timeout: true,
skip_cache: params[:skip_cache]
)
end
end