Skip to content

Commit

Permalink
Merge pull request #596 from nitz/readme-cache-example-fix
Browse files Browse the repository at this point in the history
Update README.md Cache example
  • Loading branch information
joelhulen authored Feb 21, 2019
2 parents e33acc6 + e932002 commit 8540598
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ For more detail see: [Bulkhead policy documentation](https://github.com/App-vNex

```csharp
// Define a cache Policy in the .NET Framework, using the Polly.Caching.Memory nuget package.
var memoryCacheProvider = new MemoryCacheProvider(MemoryCache.Default);
var memoryCache = new MemoryCache(new MemoryCacheOptions());
var memoryCacheProvider = new MemoryCacheProvider(memoryCache);
var cachePolicy = Policy.Cache(memoryCacheProvider, TimeSpan.FromMinutes(5));

// For .NET Core examples see the CacheProviders linked to from https://github.com/App-vNext/Polly/wiki/Cache#working-with-cacheproviders :
Expand Down

0 comments on commit 8540598

Please sign in to comment.