BlazorCacheBuster 0.0.1

dotnet add package BlazorCacheBuster --version 0.0.1                
NuGet\Install-Package BlazorCacheBuster -Version 0.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlazorCacheBuster" Version="0.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlazorCacheBuster --version 0.0.1                
#r "nuget: BlazorCacheBuster, 0.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BlazorCacheBuster as a Cake Addin
#addin nuget:?package=BlazorCacheBuster&version=0.0.1

// Install BlazorCacheBuster as a Cake Tool
#tool nuget:?package=BlazorCacheBuster&version=0.0.1                

Blazor cache buster

This package deals with making sure lib.module.js files are clear when a new deployment is made or when you update them

For more information on javascript initializers: (more info here)

How to use

  1. Add the nuget package in your Client (wasm) AND your Server (if using Blazor wasm hosted) projects.
dotnet add package BlazorCacheBuster
  1. Publish your app in Release mode and test it!
dotnet publish Client\Sample.csproj -c Release

Nuget package page can be found here.

Configuration

The following options allow you to customize the tasks executed by this package.

Custom query string

If you want to use a different query string for busting the cache, for example a specific version, add the following property in the published project's .csproj file (Server project if using Blazor hosted).


<CacheId>1</CacheId>

Disable dll rename

You can disable the cache busting add the following property in the published project's .csproj file (Server project if using Blazor hosted).

<DisableCacheBusting>true</DisableCacheBusting>

TODO: Be able to cache bust scripts/styles in index.html

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.1 3,492 1/31/2023