From 8183de796cc65fab274e331f49ca09db40d1dab6 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 4 Jun 2026 10:09:31 +0200 Subject: [PATCH] Funx flush cache x vocabolario --- .../Services/Admin/IVocabolarioService.cs | 8 ++++- .../Services/Admin/VocabolarioService.cs | 33 ++++++++++--------- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Pages/ResetCache.razor | 5 +++ Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 8 files changed, 34 insertions(+), 22 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Services/Admin/IVocabolarioService.cs b/EgwCoreLib.Lux.Data/Services/Admin/IVocabolarioService.cs index 4de5784b..abce0b89 100644 --- a/EgwCoreLib.Lux.Data/Services/Admin/IVocabolarioService.cs +++ b/EgwCoreLib.Lux.Data/Services/Admin/IVocabolarioService.cs @@ -24,6 +24,12 @@ /// Task> GetAllAsync(); + /// + /// Cancellazione FusionCache (totale) + /// + /// + Task FlushFusionCacheAsync(); + /// /// Recupera un Vocabolario per ID /// @@ -45,7 +51,7 @@ Task> ListLingueAsync(); /// - /// Traduzione lemma nella lingua desiderata + /// Esegue traduzione dato vocabolario da Lingua + Lemma /// /// /// diff --git a/EgwCoreLib.Lux.Data/Services/Admin/VocabolarioService.cs b/EgwCoreLib.Lux.Data/Services/Admin/VocabolarioService.cs index 79e0fe92..5cfceb12 100644 --- a/EgwCoreLib.Lux.Data/Services/Admin/VocabolarioService.cs +++ b/EgwCoreLib.Lux.Data/Services/Admin/VocabolarioService.cs @@ -87,6 +87,13 @@ namespace EgwCoreLib.Lux.Data.Services.Admin }); } + /// + public async Task FlushFusionCacheAsync() + { + await _cache.ClearAsync(allowFailSafe: false); + return true; + } + /// public async Task> GetAllAsync() { @@ -151,12 +158,6 @@ namespace EgwCoreLib.Lux.Data.Services.Admin } /// - /// - /// Esegue traduzione dato vocabolario da Lingua + Lemma - /// - /// - /// - /// public string Traduci(string lemma, string lingua = "IT") { if (string.IsNullOrWhiteSpace(lemma)) return string.Empty; @@ -211,11 +212,6 @@ namespace EgwCoreLib.Lux.Data.Services.Admin return answ; } - /// - /// Oggetto gestione FusionCache - /// - protected readonly IFusionCache _cache; - /// public async Task UpsertAsync(VocabolarioModel upsRec) { @@ -291,15 +287,20 @@ namespace EgwCoreLib.Lux.Data.Services.Admin #endregion Public Methods + #region Protected Fields + + /// + /// Oggetto gestione FusionCache + /// + protected readonly IFusionCache _cache; + + #endregion Protected Fields + #region Private Fields private readonly string _className; private readonly IDbContextFactory _factory; #endregion Private Fields - - #region Private Methods - - #endregion Private Methods } -} +} \ No newline at end of file diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index d9d82881..063c6799 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2606.0409 + 1.1.2606.0410 diff --git a/Lux.UI/Components/Pages/ResetCache.razor b/Lux.UI/Components/Pages/ResetCache.razor index c1a6c3dd..65ac9482 100644 --- a/Lux.UI/Components/Pages/ResetCache.razor +++ b/Lux.UI/Components/Pages/ResetCache.razor @@ -14,12 +14,17 @@ [Inject] protected IConfiguration Config { get; set; } = null!; + [Inject] + protected IVocabolarioService VService { get; set; } = null!; + protected override async Task OnInitializedAsync() { string baseUrl = Config.GetValue("ServerConf:BaseUrl") ?? ""; await Task.Delay(100); await DLService.FlushCacheAsync(); await Task.Delay(100); + await VService.FlushFusionCacheAsync(); + await Task.Delay(100); NavMan.NavigateTo(baseUrl, true); } } diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 4ea177bb..8e33a5a9 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 1.1.2606.0409 + 1.1.2606.0410 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 2b235c07..80c5bb5a 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 1.1.2606.0409

+

Versione: 1.1.2606.0410


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 9397ebfe..1b99c8c6 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2606.0409 +1.1.2606.0410 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 44ee218f..1db8b226 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2606.0409 + 1.1.2606.0410 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false