diff options
author | Stan Hu <stanhu@gmail.com> | 2019-06-27 02:19:59 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-06-27 02:24:46 +0300 |
commit | ee791d3f40913fa57d878aecb9bf8c86ea27e3b4 (patch) | |
tree | 495a2b3e9b6f60e8b671567560ee7c3c56775641 /app/controllers/search_controller.rb | |
parent | 13d8992006c5212726b843c4dd06d43caab2f7f9 (diff) |
Enable Gitaly ref caching for SearchController
As we noticed in
https://gitlab.com/gitlab-org/gitlab-ce/issues/56627#note_185828742,
clicking on the "Issues" tab often requests the same reference in
rendering Markdown.
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r-- | app/controllers/search_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index a80ab3bcd28..8c674be58c5 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -5,6 +5,8 @@ class SearchController < ApplicationController include SearchHelper include RendersCommits + around_action :allow_gitaly_ref_name_caching + skip_before_action :authenticate_user! requires_cross_project_access if: -> do search_term_present = params[:search].present? || params[:term].present? |