PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Caching Namespace / Caching­Profile Class / Caching­Profile Properties / Caching­Profile.​Acquire­Lock­Timeout­Strategy Property

CachingProfile.AcquireLockTimeoutStrategy Property

Gets or sets the behavior in case that the caching aspect could not acquire a lock because of a timeout. The default behavior is to throw a TimeoutException. You can implement your own strategy by implementing the IAcquireLockTimeoutStrategy interface. If the OnTimeout(String) does not return any exception, the cached method will be evaluated (even without a lock).

Namespace:  PostSharp.Patterns.Caching
Assembly:  PostSharp.Patterns.Caching (in PostSharp.Patterns.Caching.dll) Version: 2023.0.3.0 (2023.0.3.0)
public IAcquireLockTimeoutStrategy AcquireLockTimeoutStrategy { get; set; }

Property Value

Type: IAcquireLockTimeoutStrategy
See Also