From f1dce2160956f27fecc4a59d36d1e1e03903a84b Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 5 Apr 2019 04:33:01 -0700 Subject: Enable FindCommit caching for project and commits pages This reduces a handful of duplicate FindCommit calls while viewing the projects and commits pages. --- app/controllers/projects/commits_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/projects/commits_controller.rb') diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb index 2510a31c9b3..a49ede04de7 100644 --- a/app/controllers/projects/commits_controller.rb +++ b/app/controllers/projects/commits_controller.rb @@ -14,6 +14,8 @@ class Projects::CommitsController < Projects::ApplicationController before_action :validate_ref!, except: :commits_root before_action :set_commits, except: :commits_root + around_action :allow_gitaly_ref_name_caching + def commits_root redirect_to project_commits_path(@project, @project.default_branch) end -- cgit v1.2.3