You need to sign in or sign up before continuing.
Consider only caching empty responses when polling for notes
From https://gitlab.com/gitlab-org/gitlab-ce/issues/58571#note_161171009:
When we poll for notes, the response is cached for subsequent calls using ETag caching. This results to the JS handling the response data over and over. There is no DOM re-render so it is not too bad.
But we should still consider only caching empty responses. Most of the responses would be empty anyway.
This adds at most 2 (because of FETCH_OVERLAP
) requests that are uncached. It would look like:
- Make request, get new notes (uncached).
- Make request, get same new notes because of
FETCH_OVERLAP
(uncached). - Make request, no new notes (cached).
- Repeat step 3 until someone adds a new note.
Edited by Heinrich Lee Yu