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