diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs
index fb4cad70..c09a312d 100644
--- a/MapoDb/DataLayer.cs
+++ b/MapoDb/DataLayer.cs
@@ -769,7 +769,18 @@ namespace MapoDb
///
public static string LiveBufferHash(string idxMacchina, string bufferName)
{
- return mHash(string.Format("LIVE:{0}:{1}", idxMacchina, bufferName));
+ return mHash($"LIVE:{idxMacchina}:{bufferName}");
+ }
+
+ ///
+ /// KEY x i dati del FLog della machina specificata
+ ///
+ ///
+ ///
+ ///
+ public static string LiveFLogKeyHash(string idxMacchina, string flog)
+ {
+ return mHash($"FLOG:{idxMacchina}:{flog}");
}
///
@@ -779,7 +790,7 @@ namespace MapoDb
///
public static string LiveCurrValHash(string idxMacchina)
{
- return mHash(string.Format("LIVE:{0}:CURR_VAL", idxMacchina));
+ return mHash($"LIVE:{idxMacchina}:CURR_VAL");
}
///
@@ -789,7 +800,7 @@ namespace MapoDb
///
public static string memMapHash(string idxMacchina)
{
- return mHash(string.Format("MemMap:{0}", idxMacchina));
+ return mHash($"MemMap:{idxMacchina}");
}
///
@@ -2276,7 +2287,11 @@ namespace MapoDb
// 2020.01.31 nuovo OBJ
DataLayer man = new DataLayer();
man.taFL.InsNew(idxMacchina, dataOraEvento, flux, valore, contatore);
- //DataLayer.obj.taFL.InsNew(idxMacchina, dataOraEvento, flux, valore, contatore);
+ // 2022.06.06 salvo su redis il valore ULTIMO del flux x recupero rapido ultimo valore
+ string key = DataLayer.LiveFLogKeyHash(idxMacchina, flux);
+ // 10 min cache max...
+ int ttlFlog = 60 * 10;
+ memLayer.ML.setRSV(key, valore, ttlFlog);
// registro in risposta che รจ andato tutto bene...
answ = "OK";
}