<PackageReference Include="Polly" Version="5.1.1-v5-x-cachealpha0001" />

ContextualTimeSpanTtl

Defines a ttl strategy which will cache items for a TimeSpan which may be influenced by data in the execution context.
public static readonly string Key

The key on the execution Context to use for storing the Ttl TimeSpan for which to cache.

public TimeSpan GetTtl(Context context)

Gets the TimeSpan for which to keep an item about to be cached, which may be influenced by data in the execution context.