44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using MagMan.Core.Services;
|
|
using MagMan.Data.Admin.Services;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace MagMan.UI.Pages
|
|
{
|
|
public partial class ResetCache
|
|
{
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected MTAdminService MTService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
// resetto local/session storage utente
|
|
await MServ.StoreSessClear();
|
|
await MServ.StoreLocalClear();
|
|
// resetto cache redis
|
|
await MTService.FlushRedisCache();
|
|
string baseAppPath = Configuration["OptConf:BaseAddr"];
|
|
NavMan.NavigateTo(baseAppPath, true);
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Properties
|
|
|
|
[Inject]
|
|
private IConfiguration Configuration { get; set; } = null!;
|
|
|
|
[Inject]
|
|
private MessageService MServ { get; set; } = null!;
|
|
|
|
[Inject]
|
|
private NavigationManager NavMan { get; set; } = null!;
|
|
|
|
#endregion Private Properties
|
|
}
|
|
} |