I've been testing out Blazor, and I can't find any documentation on how to implement browser caching (either with static files like images, css, js etc, but also the dll files that are downloaded).
Is it possible to cache static and dll files in Blazor at all?
Cache-Aside (Lazy Loading) A cache-aside cache is the most common caching strategy available. The fundamental data retrieval logic can be summarized as follows: When your application needs to read data from the database, it checks the cache first to determine whether the data is available.
Blazor works best when using WebSockets as the SignalR transport due to lower latency, better reliability, and improved security.
Keeping total control of the server resources used for cache (cache keys and metrics, memory, CPU): Relieve the Front-end Server resources used for local cache. Allow external access to the runtime cache (Service Ops team, external applications outside of OutSystems factory, etc).
As of Blazor WASM 3.2-preview2 release, when an app is initially loaded, the runtime and framework files are now stored in the browser cache storage. When the app loads, it first uses the contents of the blazor.boot.json to check if it already has all of the runtime and framework files it needs in the cache. If it does, then no additional network requests are necessary.
You can read more about this in Improved framework caching
section of the Blazor WASM release blog post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With