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/refs_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/refs_controller.rb')
-rw-r--r-- | app/controllers/projects/refs_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index b97fbe19bbf..b3447812ef2 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -4,6 +4,8 @@ class Projects::RefsController < Projects::ApplicationController include ExtractsPath include TreeHelper + around_action :allow_gitaly_ref_name_caching, only: [:logs_tree] + before_action :require_non_empty_project before_action :validate_ref_id before_action :assign_ref_vars |