Skip to content

Commit 72f59a1

Browse files
authored
Merge pull request #435 from App-vNext/v590
Merge Polly v5.9.0 to master
2 parents b82366f + ec59248 commit 72f59a1

85 files changed

Lines changed: 2016 additions & 1636 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 5.9.0
2+
- Allow Timeout.InfiniteTimeSpan (no timeout) for TimeoutPolicy.
3+
- Add .AsPolicy<TResult> and .AsAsyncPolicy<TResult> methods for converting non-generic policies to generic policies.
4+
- Per Semver, indicates deprecation of overloads and properties intended to be removed or renamed in Polly v6.
5+
16
## 5.8.0
27
- Add a new onBreak overload that provides the prior state on a transition to an open state
38
- Bug fix: RelativeTtl in CachePolicy now always returns a ttl relative to time item is cached

GitVersionConfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
next-version: 5.8.0
1+
next-version: 5.9.0

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,7 @@ For details of changes by release see the [change log](https://github.com/App-vN
988988
* [@awarrenlove](https://github.com/awarrenlove) - Add ability to calculate cache Ttl based on item to cache.
989989
* [@erickhouse](https://github.com/erickhouse) - Add a new onBreak overload that provides the prior state on a transition to an open state.
990990
* [@benagain](https://github.com/benagain) - Bug fix: RelativeTtl in CachePolicy now always returns a ttl relative to time item is cached.
991+
* [@urig](https://github.com/urig) - Allow TimeoutPolicy to be configured with Timeout.InfiniteTimeSpan.
991992
992993
# Sample Projects
993994

src/GlobalAssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[assembly: AssemblyProduct("Polly")]
44
[assembly: AssemblyCompany("App vNext")]
55
[assembly: AssemblyDescription("Polly is a library that allows developers to express resilience and transient fault handling policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.")]
6-
[assembly: AssemblyCopyright("Copyright (c) 2017, App vNext")]
6+
[assembly: AssemblyCopyright("Copyright (c) 2018, App vNext")]
77

88
#if DEBUG
99
[assembly: AssemblyConfiguration("Debug")]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This project exists to test Polly.Net40Async.csproj.
22

3-
Polly.Net40Async.csproj is compiled against .NET4.5, and has to be, to use XUnit version 2.0, on which we depend. This is however a valid way of xunit-testing a .NET40 assembly. See https://github.com/xunit/xunit/issues/241#issuecomment-67725679
3+
Polly.Net40Async.Specs.csproj is compiled against .NET4.5, and has to be, to use XUnit version 2.0, on which we depend. This is however a valid way of xunit-testing a .NET40 assembly. See https://github.com/xunit/xunit/issues/241#issuecomment-67725679

src/Polly.Net40Async.nuspec

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@
1111
<iconUrl>https://raw.github.com/App-vNext/Polly/master/Polly.png</iconUrl>
1212
<projectUrl>https://github.com/App-vNext/Polly</projectUrl>
1313
<tags>Exception Handling Resilience Transient Fault Policy Circuit Breaker CircuitBreaker Retry Wait Cache Cache-aside Bulkhead Fallback Timeout Throttle Parallelization</tags>
14-
<copyright>Copyright © 2017, App vNext</copyright>
14+
<copyright>Copyright © 2018, App vNext</copyright>
1515
<releaseNotes>
1616
v5.0 is a major release with significant new resilience policies: Timeout; Bulkhead Isolation; Fallback; Cache; and PolicyWrap. See release notes back to v5.0.0 for full details.
1717

18+
5.9.0
19+
---------------------
20+
- Allow Timeout.InfiniteTimeSpan (no timeout) for TimeoutPolicy.
21+
- Add .AsPolicy&lt;TResult&gt; and .AsAsyncPolicy&lt;TResult&gt; methods for converting non-generic policies to generic policies.
22+
- Per Semver, indicates deprecation of overloads and properties intended to be removed or renamed in Polly v6.
23+
1824
5.8.0
1925
---------------------
2026
- Add a new onBreak overload that provides the prior state on a transition to an open state

src/Polly.NetStandard11/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Runtime.CompilerServices;
44

55
[assembly: AssemblyTitle("Polly")]
6-
[assembly: AssemblyVersion("5.8.0.0")]
6+
[assembly: AssemblyVersion("5.9.0.0")]
77
[assembly: CLSCompliant(true)]
88

99
[assembly: InternalsVisibleTo("Polly.NetStandard11.Specs")]

src/Polly.Shared/Caching/CachePolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ internal CachePolicy(
5353
/// <param name="cancellationToken">The cancellation token.</param>
5454
/// <returns>The value returned by the action, or the cache.</returns>
5555
[DebuggerStepThrough]
56-
public override TResult ExecuteInternal<TResult>(Func<Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)
56+
internal override TResult ExecuteInternal<TResult>(Func<Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)
5757
{
5858
return CacheEngine.Implementation<TResult>(
5959
_syncCacheProvider.For<TResult>(),

src/Polly.Shared/Caching/CachePolicyAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ internal CachePolicy(
4545
/// <param name="continueOnCapturedContext">Whether to continue on a captured synchronization context.</param>
4646
/// <returns>The value returned by the action, or the cache.</returns>
4747
[DebuggerStepThrough]
48-
public override Task<TResult> ExecuteAsyncInternal<TResult>(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext)
48+
internal override Task<TResult> ExecuteAsyncInternal<TResult>(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext)
4949
{
5050
return CacheEngine.ImplementationAsync<TResult>(
5151
_asyncCacheProvider.AsyncFor<TResult>(),

src/Polly.Shared/Caching/CacheSyntax.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public partial class Policy
77
{
88
/// <summary>
99
/// <para>Builds a <see cref="Policy"/> that will function like a result cache for delegate executions returning a result.</para>
10-
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.ExecutionKey"/>.
10+
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
1111
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
1212
/// </para>
1313
/// </summary>
@@ -23,7 +23,7 @@ public static CachePolicy Cache(ISyncCacheProvider cacheProvider, TimeSpan ttl,
2323

2424
/// <summary>
2525
/// <para>Builds a <see cref="Policy" /> that will function like a result cache for delegate executions returning a result.</para>
26-
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.ExecutionKey"/>.
26+
/// <para>Before executing a delegate returning a result, checks whether the <paramref name="cacheProvider"/> holds a value for the cache key specified by <see cref="M:Context.OperationKey"/>.
2727
/// If the <paramref name="cacheProvider"/> provides a value from cache, returns that value and does not execute the governed delegate. If the <paramref name="cacheProvider"/> does not provide a value, executes the governed delegate, stores the value with the <paramref name="cacheProvider"/>, then returns the value.
2828
/// </para>
2929
/// </summary>

0 commit comments

Comments
 (0)