From b99011af62935de0b15e8a314ffb7df1f8a3f303 Mon Sep 17 00:00:00 2001 From: Igor Date: Fri, 9 Aug 2019 21:01:55 +0000 Subject: Split MR widget into cached and non-cached serializers Splits auto-refreshing of MR widget into 2 requests: - the one which uses etag-caching and invalidates the fields on change - the one without caching The idea is to gradually move all the fields to etag-cached endpoint --- lib/gitlab/etag_caching/router.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/gitlab/etag_caching') diff --git a/lib/gitlab/etag_caching/router.rb b/lib/gitlab/etag_caching/router.rb index 17fbecbd097..d09dcdbb337 100644 --- a/lib/gitlab/etag_caching/router.rb +++ b/lib/gitlab/etag_caching/router.rb @@ -61,6 +61,10 @@ module Gitlab Gitlab::EtagCaching::Router::Route.new( %r(#{RESERVED_WORDS_PREFIX}/import/gitea/realtime_changes\.json\z), 'realtime_changes_import_gitea' + ), + Gitlab::EtagCaching::Router::Route.new( + %r(#{RESERVED_WORDS_PREFIX}/merge_requests/\d+/cached_widget\.json\z), + 'merge_request_widget' ) ].freeze -- cgit v1.2.3