Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-04-06 15:04:27 +0300
committerStan Hu <stanhu@gmail.com>2019-04-06 15:16:22 +0300
commit0d8e9f6ee3a49e00b7831b88486b1cbda83026cb (patch)
tree66bb68cd80fdca405464f681aa994fe6f979345b /app/controllers/projects_controller.rb
parent7a7c131f7bb69e398a6e2079c11c55bddd8e2bc8 (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_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 94258e0e90a..89dc43a48a1 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -10,6 +10,8 @@ class ProjectsController < Projects::ApplicationController
prepend_before_action(only: [:show]) { authenticate_sessionless_user!(:rss) }
+ around_action :allow_gitaly_ref_name_caching, only: [:index, :show]
+
before_action :whitelist_query_limiting, only: [:create]
before_action :authenticate_user!, except: [:index, :show, :activity, :refs, :resolve]
before_action :redirect_git_extension, only: [:show]
@@ -26,8 +28,6 @@ class ProjectsController < Projects::ApplicationController
before_action :authorize_admin_project!, only: [:edit, :update, :housekeeping, :download_export, :export, :remove_export, :generate_new_export]
before_action :event_filter, only: [:show, :activity]
- around_action :allow_gitaly_ref_name_caching, only: [:index, :show]
-
layout :determine_layout
def index