40 lines
925 B
C#
40 lines
925 B
C#
using Microsoft.AspNetCore.Components;
|
|
using WebDoorCreator.UI.Data;
|
|
|
|
namespace WebDoorCreator.UI.Pages
|
|
{
|
|
public partial class ForceReload
|
|
{
|
|
#region Public Methods
|
|
|
|
public async Task flushCache()
|
|
{
|
|
await Task.Delay(1);
|
|
await WDService.FlushRedisCache();
|
|
await Task.Delay(1);
|
|
// rimando a pagina corrente
|
|
NavManager.NavigateTo("/", true);
|
|
}
|
|
|
|
#endregion Public Methods
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected NavigationManager NavManager { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected WebDoorCreatorService WDService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await flushCache();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |