by jray319 · 11y ago · 0 comments
Does this mean developers will need to put in (additional) efforts to do cache invalidation when they've updated their code?
1) Changing the file name, so it's a completely new file to the browser and thus downloaded (usually by incrementing the version number, like myApp.1.0.1.js).
2) Setting different cache rules on the server for different file types. If the updates aren't critical, you can let the cache run it's course. So your cache rules could be 1 month for images, 1 day for HTML, and 1 hour for JS files.