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
94c1fe59
Commit
94c1fe59
authored
Mar 01, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move internal knowledge about expiring caches to the Repository class
parent
f8d748a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
app/models/repository.rb
app/models/repository.rb
+7
-0
app/services/geo/repository_backfill_service.rb
app/services/geo/repository_backfill_service.rb
+1
-3
No files found.
app/models/repository.rb
View file @
94c1fe59
...
...
@@ -426,6 +426,13 @@ class Repository
expire_branches_cache
end
# Runs code after a repository has been synced.
def
after_sync
expire_all_method_caches
expire_branch_cache
expire_content_cache
end
# Runs code after a new commit has been pushed.
def
after_push_commit
(
branch_name
)
expire_statistics_caches
...
...
app/services/geo/repository_backfill_service.rb
View file @
94c1fe59
...
...
@@ -52,9 +52,7 @@ module Geo
end
log
(
'Expiring caches'
)
project
.
repository
.
expire_all_method_caches
project
.
repository
.
expire_branch_cache
project
.
repository
.
expire_content_cache
project
.
after_sync
finished_at
=
DateTime
.
now
rescue
Gitlab
::
Shell
::
Error
=>
e
...
...
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