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
708501ea
Commit
708501ea
authored
Apr 08, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a short expiration time so we can use on secondary node as well
parent
9409d42f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
lib/gitlab/geo.rb
lib/gitlab/geo.rb
+2
-1
No files found.
lib/gitlab/geo.rb
View file @
708501ea
...
...
@@ -90,7 +90,8 @@ module Gitlab
def
self
.
cache_value
(
key
,
&
block
)
return
yield
unless
RequestStore
.
active?
RequestStore
.
fetch
(
key
)
{
Rails
.
cache
.
fetch
(
key
)
{
yield
}
}
# We need a short expire time as we can't manually expire on a secondary node
RequestStore
.
fetch
(
key
)
{
Rails
.
cache
.
fetch
(
key
,
expires_in:
15
.
seconds
)
{
yield
}
}
end
def
self
.
expire_cache!
...
...
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