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

ITtlStrategy<TResult>

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

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