mirror of
https://github.com/sphildreth/roadie
synced 2024-11-10 14:54:11 +00:00
20 lines
No EOL
538 B
C#
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;
|
|
}
|
|
}
|
|
} |