diff options
author | Stan Hu <stanhu@gmail.com> | 2019-04-06 15:04:27 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-04-06 15:16:22 +0300 |
commit | 0d8e9f6ee3a49e00b7831b88486b1cbda83026cb (patch) | |
tree | 66bb68cd80fdca405464f681aa994fe6f979345b /app/controllers/projects/commits_controller.rb | |
parent | 7a7c131f7bb69e398a6e2079c11c55bddd8e2bc8 (diff) |
Expand FindCommit caching to blob and refs
This enables FindCommit caching to the following actions:
* BlobController#show
* RefsController#logs_tree
It also improves caching in CommitsController since some
duplicate requests were occuring inside the before_action
definitions.
Diffstat (limited to 'app/controllers/projects/commits_controller.rb')
-rw-r--r-- | app/controllers/projects/commits_controller.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb index a49ede04de7..f540ccee386 100644 --- a/app/controllers/projects/commits_controller.rb +++ b/app/controllers/projects/commits_controller.rb @@ -7,6 +7,7 @@ class Projects::CommitsController < Projects::ApplicationController include RendersCommits prepend_before_action(only: [:show]) { authenticate_sessionless_user!(:rss) } + around_action :allow_gitaly_ref_name_caching before_action :whitelist_query_limiting, except: :commits_root before_action :require_non_empty_project before_action :assign_ref_vars, except: :commits_root @@ -14,8 +15,6 @@ 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 |