Improved Task usage

This commit is contained in:
ClemensFischer 2024-08-31 11:55:59 +02:00
parent cbe2751db7
commit 4e753ae718
10 changed files with 30 additions and 39 deletions

View file

@ -149,7 +149,6 @@ namespace MapControl.Caching
public void Refresh(string key)
{
CheckArgument(key);
}
public void Remove(string key)
@ -185,24 +184,28 @@ namespace MapControl.Caching
public Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default)
{
Set(key, value, options);
return Task.CompletedTask;
}
public Task RefreshAsync(string key, CancellationToken token = default)
{
Refresh(key);
return Task.CompletedTask;
}
public Task RemoveAsync(string key, CancellationToken token = default)
{
Remove(key);
return Task.CompletedTask;
}
public Task CleanAsync()
{
Clean();
return Task.CompletedTask;
}

View file

@ -138,13 +138,10 @@ namespace MapControl.Caching
public void Refresh(string key)
{
CheckArgument(key);
}
public Task RefreshAsync(string key, CancellationToken token = default)
{
CheckArgument(key);
return Task.CompletedTask;
}