roadie/Roadie.Api.Library/Caching/CachePolicy.cs
2019-07-03 11:21:29 -05:00

20 lines
No EOL
538 B
C#

using System;
namespace Roadie.Library.Caching
{
public sealed class CachePolicy
{
public TimeSpan ExpiresAfter { get; }
/// <summary>
/// If specified, each read of the item from the cache will reset the expiration time
/// </summary>
public bool RenewLeaseOnAccess { get; }
public CachePolicy(TimeSpan expiresAfter, bool renewLeaseOnAccess = false)
{
ExpiresAfter = expiresAfter;
RenewLeaseOnAccess = renewLeaseOnAccess;
}
}
}