View Source
Class PackageManifestCacheBuster
Computes a package's cache-bust value and appends it to its /App_Plugins importmap asset URLs. The same
value is surfaced on the manifest response so extension asset URLs can be stamped client-side; the
%CACHE_BUSTER% token is resolved separately, server-side.
Assembly: Umbraco.Core.dll
Syntax
public static class PackageManifestCacheBuster
Methods
View Source
ApplyCacheBust(string, string?)
Appends ?umb__rnd=<cacheBuster> to a clean /App_Plugins URL. URLs outside
/App_Plugins, URLs that already carry a query string, and a null/empty
cacheBuster are returned unchanged.
Declaration
public static string ApplyCacheBust(string url, string? cacheBuster)
Parameters
| Type |
Name |
Description |
| string |
url |
|
| string |
cacheBuster |
|
Returns
View Source
ComputeCacheBuster(string?, string?)
Computes a package's cache-bust value as <version>-<hash>, where hash is the first
seven characters of the host cacheBuster's hash (a git-style short hash). Falls back to the
version alone when no host cache-buster is set, to the short hash alone when the package has no version, and
to null when there is nothing to bust.
Declaration
public static string? ComputeCacheBuster(string? version, string? cacheBuster)
Parameters
| Type |
Name |
Description |
| string |
version |
|
| string |
cacheBuster |
|
Returns