mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
In the case of a multi-app scenario, different applications may store files in different locations. In order to avoid reloading files that were unchanged, a suffix can be added to indicate which "version" of this file we're loading. Even if it has a different path, because the id and "version" (which is URL(...).search) are the same, the file would not be reloaded. With Flutter tools, this scenario doesn't occur. The running application ultimately does not need to worry about the same file in different locations. The benefit to avoid this caching is that the user only ever sees one copy of every file, which is the latest version, instead of the current behavior where a "gen=N" suffix is added to a newer version. Note that this is unrelated to the XHR or its headers or any of its caching mechanisms. The XHR is only used to fetch the *list* of changed files, not the files themselves. The files get loaded as part of the `appendChild` call. https://github.com/flutter/flutter/issues/166294 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.