Changes between Initial Version and Version 2 of Ticket #32531


Ignore:
Timestamp:
Mar 9, 2021, 2:17:53 PM (4 years ago)
Author:
Nathan Vander Wilt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32531 – Description

    initial v2  
    88But here's the problem: the next time I gently refresh the browser (i.e. allow it to use its usual caching) the last step is repeated in whole! That is, the view can end up rendering the page AGAIN and AGAIN and each time the ETag matches in the end but Django does not seem to remember that.
    99
     10As soon as a "fresh" request comes in, i.e. a more aggressive refresh from the browser that disables it's cache and yields a 200 response back, all subsequent "gentle refresh" responses then get a 304 *without* the view having to re-render.
     11
    1012I suspect that the culprit might be related to the logic in `UpdateCacheMiddleware.process_response` which will only call `learn_cache_key` when the `response.status_code == 200`?
Back to Top