Skip to content

Commit

Permalink
Cache tweaks to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
reisenberger committed Feb 21, 2019
1 parent 8540598 commit 8d25944
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,12 +609,11 @@ For more detail see: [Bulkhead policy documentation](https://github.com/App-vNex
### Cache

```csharp
// Define a cache Policy in the .NET Framework, using the Polly.Caching.Memory nuget package.
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 :
// For .NET Core DI examples see the CacheProviders linked to from https://github.com/App-vNext/Polly/wiki/Cache#working-with-cacheproviders :
// - https://github.com/App-vNext/Polly.Caching.MemoryCache
// - https://github.com/App-vNext/Polly.Caching.IDistributedCache
Expand Down

0 comments on commit 8d25944

Please sign in to comment.