Skip to content

Commit 9862ffa

Browse files
smurariualastairtree
authored andcommitted
Fixing the sample code (#33)
1 parent 7b21e74 commit 9862ffa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

LazyCache/LazyCache.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<projectUrl>https://github.com/alastairtree/LazyCache</projectUrl>
1111
<iconUrl>https://raw.githubusercontent.com/alastairtree/LazyCache/master/artwork/logo-128.png</iconUrl>
1212
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13-
<description>Lazy cache is a simple,thread safe in-memory caching service</description>
13+
<description>Lazy cache is a simple, thread safe in-memory caching service</description>
1414
<releaseNotes>See https://raw.githubusercontent.com/alastairtree/LazyCache/master/ReleaseNotes.md</releaseNotes>
1515
<copyright>Copyright 2014</copyright>
1616
<summary>Lazy cache is a simple in-memory caching service for .net and c sharp. It has a developer friendly generics based API, and providing a thread safe cache implementation that guarantees to only execute your cachable delegates once (it's lazy!). Under the hood it leverages ObjectCache and Lazy to provide performance and reliability in heavy load scenarios. For more info see https://github.com/alastairtree/LazyCache </summary>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Func<ComplexObjects> complexObjectFactory = () => methodThatTakesTimeOrResources
2929

3030
// Get our ComplexObjects from the cache, or build them in the factory func
3131
// and cache the results for next time under the given key
32-
ComplexObject cachedResults = cache.GetOrAdd("uniqueKey", complexObjectFactory);
32+
ComplexObjects cachedResults = cache.GetOrAdd("uniqueKey", complexObjectFactory);
3333
```
3434

3535
As you can see the magic happens in the `GetOrAdd()` method which gives the consumer an atomic and tidy way to add caching to your code. It leverages a factory delegate `Func` and generics to make it easy to add cached method calls to your app.

0 commit comments

Comments
 (0)