diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-11-28 06:34:12 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-11-28 06:34:12 +0300 |
commit | d8f75233686fe20bff26599704fbcb235f7bb43b (patch) | |
tree | 15a38c9b174b279bac9f917c991e29b0967b9622 /app/models/merge_request.rb | |
parent | eff2404785f58241f947bd7388564f49119d517d (diff) | |
parent | 0ba03d7eb1d80e019b9b8266f0e14356d32e7d69 (diff) |
Merge branch 'events-cache-invalidation' into 'master'
Remove caching of events data
This MR removes the caching of events data as this was deemed unnecessary while increasing load on the database. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037 and 5371da341e9d7768ebab8e159b3e2cc8fad1d827 for more information.
See merge request !6578
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index fdf54cc8a7e..69c6aa700d6 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -605,18 +605,6 @@ class MergeRequest < ActiveRecord::Base self.target_project.repository.branch_names.include?(self.target_branch) end - # Reset merge request events cache - # - # Since we do cache @event we need to reset cache in special cases: - # * when a merge request is updated - # Events cache stored like events/23-20130109142513. - # The cache key includes updated_at timestamp. - # Thus it will automatically generate a new fragment - # when the event is updated because the key changes. - def reset_events_cache - Event.reset_event_cache_for(self) - end - def merge_commit_message message = "Merge branch '#{source_branch}' into '#{target_branch}'\n\n" message << "#{title}\n\n" |