summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorAndreas Kämmerle <andreas.kaemmerle@gmail.com>2018-09-13 12:00:59 +0200
committerAndreas Kämmerle <andreas.kaemmerle@gmail.com>2018-09-13 12:00:59 +0200
commit87d01cc3bfc12c08024881dc8f13101e5430e3e6 (patch)
tree05e82defa51500257f97e3530862da03668895e3 /app/models/note.rb
parentfef5c923c009c64183cc43909444a1bdaba218b7 (diff)
parent71f3d48544cc0857c8d470b182f7e809de6a4642 (diff)
downloadgitlab-ce-consolidate-page-widths-part02.tar.gz
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into consolidate-page-widths-part02consolidate-page-widths-part02
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb13
1 files changed, 1 insertions, 12 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 2e343b8f9f8..8f090cc31e6 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -389,18 +389,7 @@ class Note < ActiveRecord::Base
end
def expire_etag_cache
- return unless noteable&.discussions_rendered_on_frontend?
- return unless noteable&.etag_caching_enabled?
-
- Gitlab::EtagCaching::Store.new.touch(etag_key)
- end
-
- def etag_key
- Gitlab::Routing.url_helpers.project_noteable_notes_path(
- project,
- target_type: noteable_type.underscore,
- target_id: noteable_id
- )
+ noteable&.expire_note_etag_cache
end
def touch(*args)