♻️ Refactored the cache service
This commit is contained in:
22
DysonNetwork.Shared/Cache/IDistributedLock.cs
Normal file
22
DysonNetwork.Shared/Cache/IDistributedLock.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace DysonNetwork.Shared.Cache;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a distributed lock that can be used to synchronize access across multiple processes
|
||||
/// </summary>
|
||||
public interface IDistributedLock : IAsyncDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// The resource identifier this lock is protecting
|
||||
/// </summary>
|
||||
string Resource { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Unique identifier for this lock instance
|
||||
/// </summary>
|
||||
string LockId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Releases the lock immediately
|
||||
/// </summary>
|
||||
ValueTask ReleaseAsync();
|
||||
}
|
||||
Reference in New Issue
Block a user