Cache mechanism


bit project templates provide features in order handle the caching appropriately in different modes.

Pwa or PwaPrerender
In Pwa mode, a manifest is generated and all files will be downloaded by Pwa with the help of this manifest. In this case, the Pwa app can work in offline mode, and for example, we can leverage ef-core and SQLite in the browser, which will work offline, and after going online, it can synchronize the generated data with the server if necessary.
If a file is changed (such as font, photo, etc.), the latest changes will be automatically downloaded.
Note: that if you do not need a file, be sure to delete it so that it is no longer downloaded by Pwa.
Note: Pwa and PwaPrerender are our recommendation for production environment.
Spa, SapPrerender and PrerenderOnly
In Spa mode, if a js, css, or wasm file gets changed, the new version will be automatically requested by the browser if you use <Script> and <Link> instead of <script> and <link>, but for other file types such as fonts and images, the file name must also be changed to ensure that the client is updated.