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
4a98138f
Commit
4a98138f
authored
Nov 27, 2019
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Namespace cleanup for Gitlab::Redis::Cache
parent
9f651dc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/gitlab/diff/highlight_cache.rb
lib/gitlab/diff/highlight_cache.rb
+5
-5
No files found.
lib/gitlab/diff/highlight_cache.rb
View file @
4a98138f
...
...
@@ -10,7 +10,7 @@ module Gitlab
delegate
:diff_options
,
to: :@diff_collection
def
initialize
(
diff_collection
)
@diff_collection
=
diff_collection
@diff_collection
=
diff_collection
end
# - Reads from cache
...
...
@@ -43,7 +43,7 @@ module Gitlab
end
def
clear
Redis
::
Cache
.
with
do
|
redis
|
Gitlab
::
Redis
::
Cache
.
with
do
|
redis
|
redis
.
del
(
key
)
end
end
...
...
@@ -71,10 +71,10 @@ module Gitlab
# new_pos: 19 }
# ] }
#
# ...it will write/update a Redis hash (HSET)
# ...it will write/update a
Gitlab::
Redis hash (HSET)
#
def
write_to_redis_hash
(
hash
)
Redis
::
Cache
.
with
do
|
redis
|
Gitlab
::
Redis
::
Cache
.
with
do
|
redis
|
redis
.
multi
do
|
multi
|
hash
.
each
do
|
diff_file_id
,
highlighted_diff_lines_hash
|
multi
.
hset
(
key
,
diff_file_id
,
highlighted_diff_lines_hash
.
to_json
)
...
...
@@ -104,7 +104,7 @@ module Gitlab
results
=
[]
Redis
::
Cache
.
with
do
|
redis
|
Gitlab
::
Redis
::
Cache
.
with
do
|
redis
|
results
=
redis
.
hmget
(
key
,
file_paths
)
end
...
...
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