diff --git a/MP.INVE/Data/MiDataService.cs b/MP.INVE/Data/MiDataService.cs
index 54ebdbc2..1392243c 100644
--- a/MP.INVE/Data/MiDataService.cs
+++ b/MP.INVE/Data/MiDataService.cs
@@ -390,6 +390,10 @@ namespace MP.INVE.Data
return SteamCrypto.EncryptString(rawData, passPhrase);
}
+ ///
+ /// Svuota tutta la sessione dalla root di gestione
+ ///
+ ///
public async Task FlushRedisCache()
{
await Task.Delay(1);
@@ -397,8 +401,27 @@ namespace MP.INVE.Data
bool answ = await ExecFlushRedisPattern(pattern);
return answ;
}
+ ///
+ /// Svuota solo il pattern richiesto
+ ///
+ ///
+ ///
+ public async Task FlushRedisCache(string basePattern)
+ {
+ await Task.Delay(1);
+ RedisValue pattern = new RedisValue($"{basePattern}*");
+ bool answ = await ExecFlushRedisPattern(pattern);
+ return answ;
+ }
-
+ ///
+ /// Svuota cahce sessioni inventario
+ ///
+ public async Task FlushSessInvCache()
+ {
+ bool answ = await FlushRedisCache(redisSessionCurrList) && await FlushRedisCache(redisSessionHistList);
+ return answ;
+ }
public async Task InsertNewMag(AnagMagModel newMag)
{
@@ -469,7 +492,7 @@ namespace MP.INVE.Data
{
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
- List result = new List();
+ List? result = new List();
string source = "DB";
// cerco in redis...
RedisValue rawData = redisDb.StringGet(redisSessionCurrList);