github repo github stars

Cache mechanism

Bit TodoTemplate provides features in order handle the caching appropriately in different modes.

PWA

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.

SPA

In SPA mode, if a js, css, or dll file gets changed, the new version will be automatically requested by the browser through the magic of the asp-append-version in _Layout.cshtml file. But for other file types such as fonts and images, the file name must also be changed to ensure that the client is updated.