Use ETag caching for discussions endpoint
Summary
From https://gitlab.slack.com/archives/C72HPNV97/p1550499961110000:
cache headers on https://gitlab.com/gitlab-org/gitlab-ce/issues/30299/discussions.json are actually:
Cache-Control: max-age=0, private, must-revalidate
we set this expiration time on redis side - https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/etag_caching/store.rb#L17
We should enable caching for the discussions endpoint to significantly improve loading of comments in large issues.
Steps to reproduce
- open issue with many comments (such as https://gitlab.com/gitlab-org/gitlab-ce/issues/30299)
- comments take a few seconds to load even if there is no new comment