Skip to content

Commit 619ad36

Browse files
Update documentation
1 parent a33ee58 commit 619ad36

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

AutoIndexCache/AutoIndexCache.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<RepositoryUrl>https://github.com/rent-a-developer/AutoIndexCache.git</RepositoryUrl>
1717
<RepositoryType>GIT</RepositoryType>
1818
<PackageTags>cache index automatic thread-safe</PackageTags>
19-
<Description>A cache for .NET applications that provides automatic indexing of cache items.</Description>
19+
<Description>A high-performance, thread-safe cache for .NET applications that provides automatic indexing of cached data.</Description>
2020
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
2121
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2222
<DocumentationFile>AutoIndexCache.xml</DocumentationFile>

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
![semver](https://img.shields.io/badge/semver-1.3.0-blue)
33

44
# AutoIndexCache
5-
A thread-safe, lazy-loading cache for .NET applications that provides automatic indexing of the cached items.
5+
A high-performance, thread-safe cache for .NET applications that provides automatic indexing of cached data.
66

77
```csharp
88
using System;
@@ -20,7 +20,7 @@ public class Program
2020
{
2121
public static void Main(String[] args)
2222
{
23-
var cache = new AutoIndexCache();
23+
var cache = new AutoIndexCache.AutoIndexCache();
2424

2525
cache.SetItemsLoader(() => LoadUsers());
2626

@@ -89,9 +89,7 @@ So instead of this:
8989
```csharp
9090
class Service
9191
{
92-
private readonly AutoIndexCache cache;
93-
94-
public Service(AutoIndexCache cache)
92+
public Service(IAutoIndexCache cache)
9593
{
9694
this.cache = cache;
9795
}
@@ -100,18 +98,16 @@ class Service
10098
{
10199
return this.cache.Items<User>().UniqueIndex(a => a.Id).GetItemOrDefault(id);
102100
}
101+
102+
private readonly IAutoIndexCache cache;
103103
}
104104
```
105105

106106
you do this:
107107
```csharp
108108
class Service
109109
{
110-
private readonly AutoIndexCache cache;
111-
private readonly IItemList<User> users;
112-
private readonly IUniqueIndex<User, Int32> userById;
113-
114-
public Service(AutoIndexCache cache)
110+
public Service(IAutoIndexCache cache)
115111
{
116112
this.cache = cache;
117113
this.users = this.cache.Items<User>();
@@ -122,6 +118,10 @@ class Service
122118
{
123119
return this.userById.GetItemOrDefault(id);
124120
}
121+
122+
private readonly IAutoIndexCache cache;
123+
private readonly IUniqueIndex<User, Int64> userById;
124+
private readonly IItemsList<User> users;
125125
}
126126
```
127127

0 commit comments

Comments
 (0)