diff options
-rw-r--r-- | app/models/repository.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/fix_cache_expiration_in_repository.yml | 4 | ||||
-rw-r--r-- | spec/models/repository_spec.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index f4c51cdfdf4..526ab1e77a7 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -407,8 +407,6 @@ class Repository # Runs code after a repository has been forked/imported. def after_import expire_content_cache - expire_tags_cache - expire_branches_cache end # Runs code after a new commit has been pushed. diff --git a/changelogs/unreleased/fix_cache_expiration_in_repository.yml b/changelogs/unreleased/fix_cache_expiration_in_repository.yml new file mode 100644 index 00000000000..5f34f2bd040 --- /dev/null +++ b/changelogs/unreleased/fix_cache_expiration_in_repository.yml @@ -0,0 +1,4 @@ +--- +title: Fix redundant cache expiration in Repository +merge_request: 10575 +author: blackst0ne diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index d805e65b3c6..8bd436558cb 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1283,8 +1283,6 @@ describe Repository, models: true do describe '#after_import' do it 'flushes and builds the cache' do expect(repository).to receive(:expire_content_cache) - expect(repository).to receive(:expire_tags_cache) - expect(repository).to receive(:expire_branches_cache) repository.after_import end |