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

NonSlidingTtl

public abstract class NonSlidingTtl : ITtlStrategy
Represents an ITtlStrategy expiring at an absolute time, not with sliding expiration.

The absolute expiration time for cache items, represented by this strategy.

protected NonSlidingTtl(DateTimeOffset absoluteExpirationTime)

Constructs a new instance of the NonSlidingTtl strategy.

public Ttl GetTtl(Context context)

Gets a TTL for a cacheable item, given the current execution context.