Files
TheGoodwoodFlooringCompany/src/Libraries/Nop.Core/Caching/ILocker.cs
T
2021-10-21 20:46:04 +01:00

17 lines
634 B
C#

using System;
namespace Nop.Core.Caching
{
public interface ILocker
{
/// <summary>
/// Perform some action with exclusive lock
/// </summary>
/// <param name="resource">The key we are locking on</param>
/// <param name="expirationTime">The time after which the lock will automatically be expired</param>
/// <param name="action">Action to be performed with locking</param>
/// <returns>True if lock was acquired and action was performed; otherwise false</returns>
bool PerformActionWithLock(string resource, TimeSpan expirationTime, Action action);
}
}