Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b696169d
Commit
b696169d
authored
Jul 12, 2021
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old_cache_key from set caches
parent
2b8b1f2a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
22 deletions
+0
-22
lib/gitlab/reactive_cache_set_cache.rb
lib/gitlab/reactive_cache_set_cache.rb
+0
-5
lib/gitlab/repository_set_cache.rb
lib/gitlab/repository_set_cache.rb
+0
-5
lib/gitlab/set_cache.rb
lib/gitlab/set_cache.rb
+0
-6
spec/lib/gitlab/repository_set_cache_spec.rb
spec/lib/gitlab/repository_set_cache_spec.rb
+0
-6
No files found.
lib/gitlab/reactive_cache_set_cache.rb
View file @
b696169d
...
...
@@ -10,11 +10,6 @@ module Gitlab
@expires_in
=
expires_in
end
# NOTE Remove as part of #331319
def
old_cache_key
(
key
)
"
#{
cache_namespace
}
:
#{
key
}
:set"
end
def
cache_key
(
key
)
super
(
key
)
end
...
...
lib/gitlab/repository_set_cache.rb
View file @
b696169d
...
...
@@ -13,11 +13,6 @@ module Gitlab
@expires_in
=
expires_in
end
# NOTE Remove as part of #331319
def
old_cache_key
(
type
)
"
#{
type
}
:
#{
namespace
}
:set"
end
def
cache_key
(
type
)
super
(
"
#{
type
}
:
#{
namespace
}
"
)
end
...
...
lib/gitlab/set_cache.rb
View file @
b696169d
...
...
@@ -10,11 +10,6 @@ module Gitlab
@expires_in
=
expires_in
end
# NOTE Remove as part of https://gitlab.com/gitlab-org/gitlab/-/issues/331319
def
old_cache_key
(
key
)
"
#{
key
}
:set"
end
def
cache_key
(
key
)
"
#{
cache_namespace
}
:
#{
key
}
:set"
end
...
...
@@ -25,7 +20,6 @@ module Gitlab
with
do
|
redis
|
keys_to_expire
=
keys
.
map
{
|
key
|
cache_key
(
key
)
}
keys_to_expire
+=
keys
.
map
{
|
key
|
old_cache_key
(
key
)
}
# NOTE Remove as part of #331319
Gitlab
::
Instrumentation
::
RedisClusterValidator
.
allow_cross_slot_commands
do
redis
.
unlink
(
*
keys_to_expire
)
...
...
spec/lib/gitlab/repository_set_cache_spec.rb
View file @
b696169d
...
...
@@ -94,12 +94,6 @@ RSpec.describe Gitlab::RepositorySetCache, :clean_gitlab_redis_cache do
expect
(
cache
.
read
(
:foo
)).
to
be_empty
end
it
'expires the old key format'
do
expect_any_instance_of
(
Redis
).
to
receive
(
:unlink
).
with
(
cache
.
cache_key
(
:foo
),
cache
.
old_cache_key
(
:foo
))
# rubocop:disable RSpec/AnyInstanceOf
subject
end
end
context
'multiple keys'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment