'Blazor WASM Server Caching

I am suffering from my app displaying out of date data until the application is restarted in the azure panel.

It doesn't happen locally in debug mode in Visual Studio 2020

I am using Entity Framework 6

It's a straight forward call to the database to pull details of an order.

I have searched but cannot find any mention of caching on the server side.

In _Host.cshtml I have added the following client side javascript:

<script type="text/javascript">
    caches.delete("blazor-resources-/").then(function (e) {
        console.log("'blazor-resources-/' cache deleted");
    });
</script>

to delete the local cache.

hard refreshing the browser doesn't refresh the data either.

Can anyone offer any advice please?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source