diff --git a/IOB-UT-NEXT/RedisMan.cs b/IOB-UT-NEXT/RedisMan.cs index 58cf1ac5..f183873c 100644 --- a/IOB-UT-NEXT/RedisMan.cs +++ b/IOB-UT-NEXT/RedisMan.cs @@ -818,6 +818,33 @@ namespace IOB_UT_NEXT return answ; } + /// + /// Salvataggio di una hash di valori + /// + /// chiave + /// valori + /// scadenza preimpostata hash datetime, se null NON scade + /// + public bool redSaveHash(string hashKey, KeyValuePair[] hashFields, DateTime? hashExpire) + { + bool answ = false; + // cerco se ci sia valore in redis... + try + { + RedisKey chiave = hashKey; + answ = redSaveHash(hashKey, hashFields); + if (hashExpire != null) + { + cache.KeyExpire(chiave, hashExpire); + } + } + catch (Exception exc) + { + Logging.Instance.Error($"redSaveHash {exc}"); + } + return answ; + } + /// /// Salvataggio di una hash di valori /// @@ -1324,7 +1351,7 @@ namespace IOB_UT_NEXT // init dati di base... redServKey = redHash($"MP"); redIobKey = redHash($"IOB:{currCodIob}"); - redIobTrackKey = redHash($"IOB:Track:{currCodIob}"); + redIobTrackKey = redHash($"IOB:FluxLog:{currCodIob}"); redIobChannel = $"IobChannel_{currCodIob}"; }