<PackageReference Include="Polly" Version="7.2.0" />

Ttl

public struct Ttl
Represents a time-to-live for a given cache item.
using System; namespace Polly.Caching { public struct Ttl { public TimeSpan Timespan; public bool SlidingExpiration; public Ttl(TimeSpan timeSpan) { this = new Ttl(timeSpan, false); } public Ttl(TimeSpan timeSpan, bool slidingExpiration) { Timespan = timeSpan; SlidingExpiration = slidingExpiration; } } }