Fix redundant cache expiration in Repository
This commit is contained in:
parent
3d1cade13f
commit
9f8ae20fc4
|
@ -407,8 +407,6 @@ class Repository
|
||||||
# Runs code after a repository has been forked/imported.
|
# Runs code after a repository has been forked/imported.
|
||||||
def after_import
|
def after_import
|
||||||
expire_content_cache
|
expire_content_cache
|
||||||
expire_tags_cache
|
|
||||||
expire_branches_cache
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Runs code after a new commit has been pushed.
|
# Runs code after a new commit has been pushed.
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Fix redundant cache expiration in Repository
|
||||||
|
merge_request: 10575
|
||||||
|
author: blackst0ne
|
|
@ -1283,8 +1283,6 @@ describe Repository, models: true do
|
||||||
describe '#after_import' do
|
describe '#after_import' do
|
||||||
it 'flushes and builds the cache' do
|
it 'flushes and builds the cache' do
|
||||||
expect(repository).to receive(:expire_content_cache)
|
expect(repository).to receive(:expire_content_cache)
|
||||||
expect(repository).to receive(:expire_tags_cache)
|
|
||||||
expect(repository).to receive(:expire_branches_cache)
|
|
||||||
|
|
||||||
repository.after_import
|
repository.after_import
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue