ETag caching probably broken since 11.5.0

It seems ETag caching don't work anymore since (11.5.0) https://gitlab.com/gitlab-org/gitlab-ce/commit/782badd0a2cd00d2a9cbe591e78b30aca32e252b (introduced in https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2555/diffs to mitigate https://gitlab.com/gitlab-org/gitlab-ce/issues/51423).

This commits adds no-store to the response thus the client cannot send the If-None-Match request header.

Screen_Shot_2019-02-19_at_13.44.26

If I remove no-store, the 304 are back:

Screen_Shot_2019-02-19_at_13.45.12

I'm wondering if we should only set no-store for non-XHR requests? 🤔 I will create an issue.

This would have prevented this regression from happening: https://gitlab.com/gitlab-org/gitlab-ce/issues/49321

/cc @jameslopez

Edited by Rémy Coutable