Changes between Initial Version and Version 1 of Ticket #29277


Ignore:
Timestamp:
Mar 30, 2018, 11:39:08 AM (7 years ago)
Author:
David Kerkeslager
Comment:

I can implement this ticket, but I haven't contributed to Django before, and looking at the relevant source code it's going to take me a little while to figure out how to do it. If someone else wants to do it who is more familiar with the codebase, it would probably get done quicker.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29277 – Description

    initial v1  
    3333
    3434Instead, the purpose of this is to allow us to serve static files with `Cache-Control: immutable` or `Cache-Control: max-age=<some large number>` without fear. As long as the content of the file does not change, the URL's `cache_hash` will not change, so the browser will use the cached version. But if the content of the static file changes, the `cache_hash` parameter will change, causing the browser to request the new version of the file. This gets us the best of both worlds: we maximize usage of browser cache for static files, while never having to worry that our users are seeing stale versions of static files.
     35
     36It may make sense to store the MD5 hash in Django's cache so that it doesn't get calculated every time.
Back to Top