diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /lib/gitlab/etag_caching | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'lib/gitlab/etag_caching')
-rw-r--r-- | lib/gitlab/etag_caching/middleware.rb | 12 | ||||
-rw-r--r-- | lib/gitlab/etag_caching/store.rb | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/etag_caching/middleware.rb b/lib/gitlab/etag_caching/middleware.rb index a1918ee6ad5..f6431483a15 100644 --- a/lib/gitlab/etag_caching/middleware.rb +++ b/lib/gitlab/etag_caching/middleware.rb @@ -97,12 +97,12 @@ module Gitlab def add_instrument_for_cache_hit(status, route, request) payload = { etag_route: route.name, - params: request.filtered_parameters, - headers: request.headers, - format: request.format.ref, - method: request.request_method, - path: request.filtered_path, - status: status + params: request.filtered_parameters, + headers: request.headers, + format: request.format.ref, + method: request.request_method, + path: request.filtered_path, + status: status } ActiveSupport::Notifications.instrument( diff --git a/lib/gitlab/etag_caching/store.rb b/lib/gitlab/etag_caching/store.rb index 44c6984c09b..437d577e70e 100644 --- a/lib/gitlab/etag_caching/store.rb +++ b/lib/gitlab/etag_caching/store.rb @@ -16,9 +16,9 @@ module Gitlab etags = keys.map { generate_etag } Gitlab::Redis::SharedState.with do |redis| - redis.pipelined do + redis.pipelined do |pipeline| keys.each_with_index do |key, i| - redis.set(redis_shared_state_key(key), etags[i], ex: EXPIRY_TIME, nx: only_if_missing) + pipeline.set(redis_shared_state_key(key), etags[i], ex: EXPIRY_TIME, nx: only_if_missing) end end end |