Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Apr 8, 2024
1 parent 444ecdd commit 5e82342
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/ZiggyCreatures.FusionCache.Chaos/ChaosMemoryLocker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public ChaosMemoryLocker(IFusionCacheMemoryLocker innerMemoryLocker, ILogger<Cha
}

/// <inheritdoc/>
public async ValueTask<object?> AcquireLockAsync(string cacheName, string cacheInstanceId, string operationId, string key, TimeSpan timeout, ILogger? logger, CancellationToken token)
public ValueTask<object?> AcquireLockAsync(string cacheName, string cacheInstanceId, string operationId, string key, TimeSpan timeout, ILogger? logger, CancellationToken token)
{
MaybeChaos(token);
return await _innerMemoryLocker.AcquireLockAsync(cacheName, cacheInstanceId, operationId, key, timeout, logger, token);
return _innerMemoryLocker.AcquireLockAsync(cacheName, cacheInstanceId, operationId, key, timeout, logger, token);
}

/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,15 @@ public async ValueTask<bool> SetEntryAsync<TValue>(string operationId, string ke
return (null, false);
}

public async ValueTask<bool> RemoveEntryAsync(string operationId, string key, FusionCacheEntryOptions options, bool isBackground, CancellationToken token)
public ValueTask<bool> RemoveEntryAsync(string operationId, string key, FusionCacheEntryOptions options, bool isBackground, CancellationToken token)
{
if (IsCurrentlyUsable(operationId, key) == false)
return false;
return new ValueTask<bool>(false);

// ACTIVITY
using var activity = Activities.SourceDistributedLevel.StartActivityWithCommonTags(Activities.Names.DistributedRemove, _options.CacheName, _options.InstanceId!, key, operationId, CacheLevelKind.Distributed);

return await ExecuteOperationAsync(
return ExecuteOperationAsync(
operationId,
key,
async ct =>
Expand All @@ -276,6 +276,6 @@ public async ValueTask<bool> RemoveEntryAsync(string operationId, string key, Fu
"removing entry from distributed" + isBackground.ToString(" (background)"),
options,
token
).ConfigureAwait(false);
);
}
}

0 comments on commit 5e82342

Please sign in to comment.