From e26ed56c4211fb6eeb2128df918fd273954683fb Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 12 Dec 2022 12:55:03 +0100 Subject: [PATCH] Ottimizzazione codice x rielttura parametri --- MP.SPEC/Data/MpDataService.cs | 13 +++++++++++-- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index f8bf8e65..4fbfe663 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -613,8 +613,11 @@ namespace MP.SPEC.Data result = await Task.FromResult(dbController.FluxLogGetLastFilt(DtMax, DtMin, IdxMacchina, CodFlux, MaxRec)); // serializzo e salvo... rawData = JsonConvert.SerializeObject(result); - var canCache = await tryGetConfig("SPEC_ParametriEnableReidsCache"); - if (canCache != "false") + if (string.IsNullOrEmpty(canCacheParametri)) + { + canCacheParametri = await tryGetConfig("SPEC_ParametriEnableRedisCache"); + } + if (canCacheParametri != "false") { redisDb.StringSet(currKey, rawData, TimeSpan.FromSeconds(redisCacheSec / 2)); } @@ -1377,6 +1380,12 @@ namespace MP.SPEC.Data #endregion Protected Fields + #region Protected Properties + + protected string canCacheParametri { get; set; } = ""; + + #endregion Protected Properties + #region Protected Methods /// diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index e35ea786..36b1e18a 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2212.1211 + 6.16.2212.1212 diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 58bba000..4ffc3cea 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2212.1211

+

Versione: 6.16.2212.1212


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index e2b22086..5ed644d1 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2212.1211 +6.16.2212.1212 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 295e69e5..0ca4c5fd 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2212.1211 + 6.16.2212.1212 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false