Skip to content

Commit

Permalink
Remove cache syntax overloads not used in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eugbaranov committed Feb 14, 2020
1 parent 5379c90 commit 06ede36
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 948 deletions.
5 changes: 1 addition & 4 deletions src/Polly.Specs/Caching/CacheTResultSpecs.cs
Expand Up @@ -203,12 +203,9 @@ public void Should_allow_custom_FuncICacheKeyStrategy()
[Fact]
public void Should_allow_custom_ICacheKeyStrategy()
{
Action<Context, string, Exception> noErrorHandling = (_, __, ___) => { };
Action<Context, string> emptyDelegate = (_, __) => { };

ISyncCacheProvider stubCacheProvider = new StubCacheProvider();
ICacheKeyStrategy cacheKeyStrategy = new StubCacheKeyStrategy(context => context.OperationKey + context["id"]);
CachePolicy<ResultClass> cache = Policy.Cache<ResultClass>(stubCacheProvider.For<ResultClass>(), new RelativeTtl(TimeSpan.MaxValue), cacheKeyStrategy, emptyDelegate, emptyDelegate, emptyDelegate, noErrorHandling, noErrorHandling);
CachePolicy<ResultClass> cache = Policy.Cache<ResultClass>(stubCacheProvider.For<ResultClass>(), new RelativeTtl(TimeSpan.MaxValue), cacheKeyStrategy);

object person1 = new ResultClass(ResultPrimitive.Good, "person1");
stubCacheProvider.Put("person1", person1, new Ttl(TimeSpan.MaxValue));
Expand Down

0 comments on commit 06ede36

Please sign in to comment.