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:
authorToon Claes <toon@gitlab.com>2017-04-04 18:38:16 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-04-07 00:50:36 +0300
commit847b9c82326d4fa1c4ab28f0f500a374e92728cb (patch)
tree044f6fb772c80a2604e79ebf6ffabb3610d58172 /lib/gitlab
parentebae10467d1bfa03370d131533f2905673c03f71 (diff)
Use Etag caching for pipelines json
Enable caching in the Etag::Middleware and when a pipeline changes status, expire the cache for the project pipelines path.
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/etag_caching/middleware.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/etag_caching/middleware.rb b/lib/gitlab/etag_caching/middleware.rb
index 630fe4fa849..6a58d483781 100644
--- a/lib/gitlab/etag_caching/middleware.rb
+++ b/lib/gitlab/etag_caching/middleware.rb
@@ -10,6 +10,10 @@ module Gitlab
{
regexp: %r(^(?!.*(#{RESERVED_WORDS})).*/issues/\d+/rendered_title\z),
name: 'issue_title'
+ },
+ {
+ regexp: %r(^(?!.*(#{RESERVED_WORDS})).*/pipelines\.json\z),
+ name: 'project_pipelines'
}
].freeze