diff --git a/README.md b/README.md index efd3239a..bd685630 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ public class Startup } ``` -### Step 3 : Write code in you controller +### Step 3 : Write code in your controller ```csharp [Route("api/[controller]")] diff --git a/docs/AspectCore.md b/docs/AspectCore.md index 51b0583c..e231c4cc 100644 --- a/docs/AspectCore.md +++ b/docs/AspectCore.md @@ -1,12 +1,12 @@ # Caching Intercept via AspectCore -EasyCaching.Interceptor.AspectCore is a caching intercept library which is based on **EasyCaching.Core** and **AspectCore**. +EasyCaching.Interceptor.AspectCore is a caching interceptor library which is based on **EasyCaching.Core** and **AspectCore**. -When using this library, it can help us to separate the operation between business logic and caching logic. +When using this library, it can help us to separate operations between business logic and caching logic. # How to use ? -Before using **EasyCaching.Interceptor.AspectCore**, we should specify which type of caching you want to use!! In this document, we will use EasyCaching.InMemory for example. +Before using **EasyCaching.Interceptor.AspectCore**, you should specify which type of caching you want to use!! In following example, we will use EasyCaching.InMemory. ## 1. Install the package via Nuget @@ -20,15 +20,15 @@ Install-Package EasyCaching.InMemory ### 2.1 Define the interface -We need to add `EasyCachingAble`,`EasyCachingPut` or `EasyCachingEvict` on the methods that we want to simplify the caching operation. +We need to add `EasyCachingAble`,`EasyCachingPut` or `EasyCachingEvict` on the methods where we want to simplify the caching operations. -The following unordered list shows you what the attribute will affect the caching. +The following list shows you which attributes you can use for caching: - EasyCachingAble , Read from cached items - EasyCachingPut , Update the cached item - EasyCachingEvict , Remove one cached item or multi cached items -There are some properties that we should know +These properties can be applied on attributes Property | Description | Apply ---|---|--- @@ -39,9 +39,9 @@ Expiration | To specify the expiration of your cache item,the unit is second | IsAll | Whether remove all the cached items start with the CacheKeyPrefix | EasyCachingEvict only IsBefore | Remove the cached item before method excute or after method excute | EasyCachingEvict only -Here is a easy sample to show you how to use. +how to use example: -Defining a regular interface at first. +Define interface first. ```csharp public interface IDemoService diff --git a/docs/CSRedis.md b/docs/CSRedis.md index 913e179f..984ee05a 100644 --- a/docs/CSRedis.md +++ b/docs/CSRedis.md @@ -16,9 +16,9 @@ Install-Package EasyCaching.CSRedis ### 2. Config in Startup class -There are two options you can choose when you config the caching provider. +There are two way's how you can configure caching provider. -First of all, we can config by C# code. +By C# code: ```csharp public class Startup @@ -47,7 +47,7 @@ public class Startup } ``` -What's more, we also can read the configuration from `appsettings.json`. +Alternatively you can store configuration in the `appsettings.json`. ```cs public class Startup @@ -67,7 +67,7 @@ public class Startup } ``` -And what we add in `appsettings.json` are as following: +`appsettings.json` example: ```JSON "easycaching": { @@ -87,7 +87,7 @@ And what we add in `appsettings.json` are as following: ### 3. Call the IEasyCachingProvider -The following code show how to use EasyCachingProvider in ASP.NET Core Web API. +Following code shows how to use EasyCachingProvider in ASP.NET Core Web API. ```csharp [Route("api/[controller]")] diff --git a/docs/Castle.md b/docs/Castle.md index 891a1d86..df29393a 100644 --- a/docs/Castle.md +++ b/docs/Castle.md @@ -1,12 +1,12 @@ # Caching Intercept via Castle -EasyCaching.Interceptor.Castle is a caching intercept library which is based on **EasyCaching.Core** and **Castle.Core**. +EasyCaching.Interceptor.Castle is a caching interceptor library which is based on **EasyCaching.Core** and **Castle.Core**. When using this library, it can help us to separate the operation between business logic and caching logic. # How to use ? -Before using **EasyCaching.Interceptor.Castle**, we should specify which type of caching you want to use!! In this document, we will use EasyCaching.InMemory for example. +Before using **EasyCaching.Interceptor.Castle**, we should specify which type of caching you want to use!! In this example, we will use EasyCaching.InMemory. ## 1. Install the package via Nuget @@ -20,15 +20,15 @@ Install-Package EasyCaching.InMemory ### 2.1 Define the interface -We need to add `EasyCachingAble`,`EasyCachingPut` or `EasyCachingEvict` on the methods that we want to simplify the caching operation. +We need to add `EasyCachingAble`,`EasyCachingPut` or `EasyCachingEvict` on the methods where we want to simplify the caching operation. -The following unordered list shows you what the attribute will affect the caching. +The following list shows you which attributes you can use for caching: - EasyCachingAble , Read from cached items - EasyCachingPut , Update the cached item - EasyCachingEvict , Remove one cached item or multi cached items -There are some properties that we should know +These properties can be applied on attributes Property | Description | Apply ---|---|--- @@ -39,9 +39,9 @@ Expiration | To specify the expiration of your cache item,the unit is second | IsAll | Whether remove all the cached items start with the CacheKeyPrefix | EasyCachingEvict only IsBefore | Remove the cached item before method excute or after method excute | EasyCachingEvict only -Here is a easy sample to show you how to use. +how to use example: -Defining a regular interface at first. +Define interface first. ```csharp public interface IDemoService diff --git a/docs/Hybrid.md b/docs/Hybrid.md index 53238c47..17fb1fd0 100644 --- a/docs/Hybrid.md +++ b/docs/Hybrid.md @@ -2,9 +2,9 @@ HybridCachingProvider will combine local caching and distributed caching together. -And the most important problem is to keep the newest local cached value. +The most important problem that this caching provider solves is that it keeps the newest local cached value. -When we modify a cached value, the provider will send a message to `EasyCaching Bus` so that we can notify other Apps to remove the old value. +When we modify a cached value, the provider will send a message to `EasyCaching Bus` so that it can notify other Apps to remove the old value. The following image shows how it runs. @@ -66,7 +66,7 @@ public class Startup ### 3. Call `IHybridCachingProvider` -The following code show how to use EasyCachingProvider in ASP.NET Core Web API. +Following code shows how to use EasyCachingProvider in ASP.NET Core Web API. ```csharp [Route("api/[controller]")] diff --git a/docs/In-Memory.md b/docs/In-Memory.md index ba98c7f3..e4c2490e 100644 --- a/docs/In-Memory.md +++ b/docs/In-Memory.md @@ -1,8 +1,8 @@ # DefaultInMemoryCachingProvider -EasyCaching.InMemory is a in-memory caching lib which is based on **EasyCaching.Core**. +EasyCaching.InMemory is an in-memory caching lib which is based on **EasyCaching.Core**. -When you use this lib , it means that you will handle the memory of current server . As usual , we named it as local caching . +When you use this lib, it means that you will handle the memory of current server. As usual, we named it as local caching. ## How to use ? @@ -14,9 +14,9 @@ Install-Package EasyCaching.InMemory ### 2. Config in Startup class -There are two options you can choose when you config the caching provider. +There are two way's how you can configure caching provider. -First of all, we can config by C# code. +By C# code: ```csharp public class Startup @@ -57,7 +57,7 @@ public class Startup } ``` -What's more, we also can read the configuration from `appsettings.json`. +Alternatively you can store configuration in the `appsettings.json`. ```csharp public class Startup @@ -78,7 +78,7 @@ public class Startup } ``` -And what we add in `appsettings.json` are as following: +`appsettings.json` example: ```JSON "easycaching": { @@ -97,7 +97,7 @@ And what we add in `appsettings.json` are as following: ### 3. Call the EasyCachingProvider -The following code show how to use EasyCachingProvider in ASP.NET Core Web API. +Following code shows how to use EasyCachingProvider in ASP.NET Core Web API. ```csharp [Route("api/[controller]")] diff --git a/docs/Memcached.md b/docs/Memcached.md index 305be32e..04674cca 100644 --- a/docs/Memcached.md +++ b/docs/Memcached.md @@ -2,7 +2,7 @@ EasyCaching.Memcached is a memcached caching lib which is based on **EasyCaching.Core** and **[EnyimMemcachedCore](https://github.com/cnblogs/EnyimMemcachedCore)**. -When you use this lib , it means that you will handle the data of your memcached servers . As usual , we will use it as distributed caching . +When you use this lib, it means that you will handle the data of your memcached servers. As usual, we will use it as distributed caching. # How to use ? diff --git a/docs/ProviderFactory.md b/docs/ProviderFactory.md index a2b41f5f..5606f083 100644 --- a/docs/ProviderFactory.md +++ b/docs/ProviderFactory.md @@ -1,6 +1,6 @@ # EasyCachingProviderFactory -`EasyCachingProviderFactory` is a new feature after v0.4.0 which provides a factory to get providers +`EasyCachingProviderFactory` is a new feature which was implemented in v0.4.0. It provides a factory to get providers that we register in startup. # Why ? @@ -14,9 +14,9 @@ After releasing v0.4.0 of EasyCaching, we can deal with this scenario. This usage of `EasyCachingProviderFactory` is similar with `HttpClientFactory`. -There are two types of providers(`IEasyCachingProvider` and `IRedisCachingProvider`) can use `EasyCachingProviderFactory` to create. +There are two types of providers(`IEasyCachingProvider` and `IRedisCachingProvider`) that `EasyCachingProviderFactory` can create. -Here use two InMemory caching provders and two Redis caching providers to show. +Following examples uses two InMemory caching provders and two Redis caching providers. ## 1. Install the packages via Nuget @@ -58,7 +58,7 @@ public void ConfigureServices(IServiceCollection services) ### 3. Call the IEasyCachingProviderFactory -The following code show how to use IEasyCachingProviderFactory in ASP.NET Core Web API. +Following code shows how to use IEasyCachingProviderFactory in ASP.NET Core Web API. ```csharp [Route("api/[controller]")] diff --git a/docs/Redis.md b/docs/Redis.md index fa5ef5e1..322b394f 100644 --- a/docs/Redis.md +++ b/docs/Redis.md @@ -2,7 +2,7 @@ EasyCaching.Redis is a redis caching lib which is based on **EasyCaching.Core** and **StackExchange.Redis**. -When you use this lib , it means that you will handle the data of your redis servers . As usual , we will use it as distributed caching . +When you use this lib, it means that you will handle the data of your redis servers. As usual, we will use it as distributed caching. # How to use ? @@ -16,9 +16,9 @@ Install-Package EasyCaching.Redis ### 2. Config in Startup class -There are two options you can choose when you config the caching provider. +There are two way's how you can configure caching provider. -First of all, we can config by C# code. +By C# code: ```csharp public class Startup @@ -41,7 +41,7 @@ public class Startup } ``` -What's more, we also can read the configuration from `appsettings.json`. +Alternatively you can store configuration in the `appsettings.json`. ```cs public class Startup @@ -61,7 +61,7 @@ public class Startup } ``` -And what we add in `appsettings.json` are as following: +`appsettings.json` example: ```JSON "easycaching": { @@ -90,7 +90,7 @@ And what we add in `appsettings.json` are as following: ### 3. Call the IEasyCachingProvider -The following code show how to use EasyCachingProvider in ASP.NET Core Web API. +Following code shows how to use EasyCachingProvider in ASP.NET Core Web API. ```csharp [Route("api/[controller]")] diff --git a/docs/SQLite.md b/docs/SQLite.md index 8cb4ed49..2dc9729e 100644 --- a/docs/SQLite.md +++ b/docs/SQLite.md @@ -2,7 +2,7 @@ SQLite is another choice of local caching. -There are two scenarios are good for us to use SQLite as our local caching! +There are two scenarios where SQLite is recommended to use as our local caching! 1. Persisted caching item. 2. Rebuild caching item.