diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-02-23 14:02:59 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-02-23 14:02:59 +0300 |
commit | ff28a7cc3687485ee138d4616a56ba1548a03e7c (patch) | |
tree | d2a478e956b41ea0291b5856bd68e8663a74a46d /app/services/git_push_service.rb | |
parent | 884094a77e19b225345b028e64a5355747e716dd (diff) |
Moved cache expiration code to Repository hooks
This keeps all the cache expiration code in a single file/class instead
of spreading it all across the codebase.
Diffstat (limited to 'app/services/git_push_service.rb')
-rw-r--r-- | app/services/git_push_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index a1711d234ff..9ba200f7bde 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -16,13 +16,13 @@ class GitPushService < BaseService # 5. Executes the project's services # def execute - @project.repository.expire_cache(branch_name) + @project.repository.after_push_commit(branch_name) if push_remove_branch? - @project.repository.expire_has_visible_content_cache + @project.repository.after_remove_branch @push_commits = [] elsif push_to_new_branch? - @project.repository.expire_has_visible_content_cache + @project.repository.after_create_branch # Re-find the pushed commits. if is_default_branch? |