diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2018-06-22 15:59:36 +0300 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2018-06-29 18:41:57 +0300 |
commit | d4d6528c863d48c9e2d30e6b5927ef01ec35e0e3 (patch) | |
tree | 68d1079afab2b1ebaabc855425889f253cd16c48 /app/models/repository.rb | |
parent | 9c3214640cfb572af3cc419d159c11bcd5b5e624 (diff) |
Expire correct method caches after HEAD changed
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 3089d0162ee..efe7c95f786 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -283,6 +283,10 @@ class Repository ) end + def cached_methods + CACHED_METHODS + end + def expire_tags_cache expire_method_caches(%i(tag_names tag_count)) @tags = nil @@ -423,7 +427,7 @@ class Repository # Runs code after the HEAD of a repository is changed. def after_change_head - expire_method_caches(METHOD_CACHES_FOR_FILE_TYPES.keys) + expire_all_method_caches end # Runs code after a repository has been forked/imported. |