This commit is contained in:
2021-10-21 20:46:04 +01:00
parent 60c1d0e8f8
commit 9e1c17e82a
8150 changed files with 715974 additions and 235 deletions
+16
View File
@@ -0,0 +1,16 @@
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);
}
}