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

ITtlStrategy

public interface ITtlStrategy
Defines a strategy for providing time-to-live durations for cacheable results.
Ttl GetTtl(Context context)

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