Fixed if() expression in CacheTable.Refresh()

This commit is contained in:
KharchenkoVV 2021-09-24 15:17:30 +05:00
parent 8ad98027cb
commit 614519c3c8

View File

@ -74,7 +74,7 @@ namespace AsbCloudInfrastructure.Services.Cache
return true;
}
if ((!cached.Any()) && (refreshMode == RefreshMode.IfResultEmpty))
if ((refreshMode == RefreshMode.IfResultEmpty) && !cached.Any())
{
Refresh();
return true;
@ -91,7 +91,7 @@ namespace AsbCloudInfrastructure.Services.Cache
return true;
}
if ((!cached.Any()) && (refreshMode == RefreshMode.IfResultEmpty))
if (refreshMode == RefreshMode.IfResultEmpty && !cached.Any())
{
await RefreshAsync(token);
return true;