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

DefaultCacheKeyStrategy

The default cache key strategy for CachePolicy. Returns the property OperationKey.
using System.Runtime.CompilerServices; namespace Polly.Caching { public class DefaultCacheKeyStrategy : ICacheKeyStrategy { [System.Runtime.CompilerServices.Nullable(1)] public static readonly ICacheKeyStrategy Instance = new DefaultCacheKeyStrategy(); [System.Runtime.CompilerServices.NullableContext(1)] public string GetCacheKey(Context context) { return context.OperationKey; } } }