improve cache busting for module/theme static assets (ie. do not require a restart)

This commit is contained in:
sbwalker
2026-02-17 09:31:13 -05:00
parent e85b1001c6
commit 3af03d308e
8 changed files with 38 additions and 4 deletions

View File

@@ -46,7 +46,8 @@
</div>
</div>
</form>
<Section Name="Information" ResourceKey="Information">
<br />
<Section Name="Information" ResourceKey="Information">
<div class="container">
<div class="row mb-1 align-items-center">
<Label Class="col-sm-3" For="moduledefinitionname" HelpText="The internal name of the module" ResourceKey="InternalName">Internal Name: </Label>
@@ -97,7 +98,13 @@
}
</div>
</div>
</div>
<div class="row mb-1 align-items-center">
<Label Class="col-sm-3" For="fingerprint" HelpText="A unique identifier for the module's static resources. This value can be changed by clicking the Save option below (ie. cache busting)." ResourceKey="Fingerprint">Fingerprint: </Label>
<div class="col-sm-9">
<input id="fingerprint" class="form-control" @bind="@_fingerprint" disabled />
</div>
</div>
</div>
</Section>
<br />
<button type="button" class="btn btn-success" @onclick="SaveModuleDefinition">@SharedLocalizer["Save"]</button>
@@ -231,6 +238,7 @@
private string _url = "";
private string _contact = "";
private string _license = "";
private string _fingerprint = "";
private List<Permission> _permissions = null;
private string _createdby;
private DateTime _createdon;
@@ -266,6 +274,7 @@
_url = moduleDefinition.Url;
_contact = moduleDefinition.Contact;
_license = moduleDefinition.License;
_fingerprint = moduleDefinition.Fingerprint;
_permissions = moduleDefinition.PermissionList;
_createdby = moduleDefinition.CreatedBy;
_createdon = moduleDefinition.CreatedOn;

View File

@@ -30,6 +30,7 @@
</div>
</div>
</form>
<br />
<Section Name="Information" ResourceKey="Information" Heading="Information">
<div class="container">
<div class="row mb-1 align-items-center">
@@ -81,6 +82,12 @@
}
</div>
</div>
<div class="row mb-1 align-items-center">
<Label Class="col-sm-3" For="fingerprint" HelpText="A unique identifier for the theme's static resources. This value can be changed by clicking the Save option below (ie. cache busting)." ResourceKey="Fingerprint">Fingerprint: </Label>
<div class="col-sm-9">
<input id="fingerprint" class="form-control" @bind="@_fingerprint" disabled />
</div>
</div>
</div>
</Section>
<br />
@@ -117,6 +124,7 @@
private string _url = "";
private string _contact = "";
private string _license = "";
private string _fingerprint = "";
private List<Permission> _permissions = null;
private string _createdby;
private DateTime _createdon;
@@ -143,6 +151,7 @@
_url = theme.Url;
_contact = theme.Contact;
_license = theme.License;
_fingerprint = theme.Fingerprint;
_permissions = theme.PermissionList;
_createdby = theme.CreatedBy;
_createdon = theme.CreatedOn;

View File

@@ -234,4 +234,10 @@
<data name="Pages.Heading" xml:space="preserve">
<value>Pages</value>
</data>
<data name="Fingerprint.Text" xml:space="preserve">
<value>Fingerprint:</value>
</data>
<data name="Fingerprint.HelpText" xml:space="preserve">
<value>A unique identifier for the module's static resources. This value can be changed by clicking the Save option below (ie. cache busting).</value>
</data>
</root>

View File

@@ -186,4 +186,10 @@
<data name="Permissions.Heading" xml:space="preserve">
<value>Permissions</value>
</data>
<data name="Fingerprint.Text" xml:space="preserve">
<value>Fingerprint:</value>
</data>
<data name="Fingerprint.HelpText" xml:space="preserve">
<value>A unique identifier for the theme's static resources. This value can be changed by clicking the Save option below (ie. cache busting).</value>
</data>
</root>