inizio definizione porte
This commit is contained in:
@@ -113,7 +113,7 @@ namespace WebDoorCreator.UI.Data
|
||||
{
|
||||
var dbResult = await dbController.CompanyAddMod(currRec);
|
||||
// elimino cache redis...
|
||||
RedisValue pattern = new RedisValue($"{rKeyCompany}:*");
|
||||
RedisValue pattern = new RedisValue($"{rKeyCompany}");
|
||||
bool answ = await ExecFlushRedisPattern(pattern);
|
||||
await Task.Delay(1);
|
||||
return dbResult;
|
||||
@@ -153,7 +153,7 @@ namespace WebDoorCreator.UI.Data
|
||||
public async Task<bool> FlushRedisCache()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
RedisValue pattern = new RedisValue($"{redisBaseAddr}:*");
|
||||
RedisValue pattern = new RedisValue($"{redisBaseAddr}");
|
||||
bool answ = await ExecFlushRedisPattern(pattern);
|
||||
return answ;
|
||||
}
|
||||
@@ -404,7 +404,7 @@ namespace WebDoorCreator.UI.Data
|
||||
{
|
||||
var dbResult = await dbController.OrderAdd(currRec);
|
||||
// elimino cache redis...
|
||||
RedisValue pattern = new RedisValue($"{rKeyOrderStatus}:*");
|
||||
RedisValue pattern = new RedisValue($"{rKeyOrderStatus}");
|
||||
bool answ = await ExecFlushRedisPattern(pattern);
|
||||
await Task.Delay(1);
|
||||
return dbResult;
|
||||
@@ -424,7 +424,7 @@ namespace WebDoorCreator.UI.Data
|
||||
|
||||
List<DoorModel>? dbResult = new List<DoorModel>();
|
||||
// cerco da cache
|
||||
string currKey = rKeyDoor;
|
||||
string currKey = $"{rKeyDoor}:{orderId}";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string? rawData = await redisDb.StringGetAsync(currKey);
|
||||
@@ -464,10 +464,13 @@ namespace WebDoorCreator.UI.Data
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorsAddMod(DoorModel currRec)
|
||||
{
|
||||
var dbResult = await dbController.DoorsAddMod(currRec);
|
||||
// elimino cache redis...
|
||||
RedisValue pattern = new RedisValue($"{rKeyDoor}:*");
|
||||
var dbResult = await dbController.DoorUpsert(currRec);
|
||||
// elimino cache redis dati porta...
|
||||
RedisValue pattern = new RedisValue($"{rKeyDoor}");
|
||||
bool answ = await ExecFlushRedisPattern(pattern);
|
||||
// elimino cache redis dati ordine...
|
||||
pattern = new RedisValue($"{rKeyOrderStatus}");
|
||||
answ = await ExecFlushRedisPattern(pattern);
|
||||
await Task.Delay(1);
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user