Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]")]
Expand Down
16 changes: 8 additions & 8 deletions docs/AspectCore.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
---|---|---
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions docs/CSRedis.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -67,7 +67,7 @@ public class Startup
}
```

And what we add in `appsettings.json` are as following:
`appsettings.json` example:

```JSON
"easycaching": {
Expand All @@ -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]")]
Expand Down
14 changes: 7 additions & 7 deletions docs/Castle.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
---|---|---
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docs/Hybrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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]")]
Expand Down
14 changes: 7 additions & 7 deletions docs/In-Memory.md
Original file line number Diff line number Diff line change
@@ -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 ?

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -78,7 +78,7 @@ public class Startup
}
```

And what we add in `appsettings.json` are as following:
`appsettings.json` example:

```JSON
"easycaching": {
Expand All @@ -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]")]
Expand Down
2 changes: 1 addition & 1 deletion docs/Memcached.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?

Expand Down
8 changes: 4 additions & 4 deletions docs/ProviderFactory.md
Original file line number Diff line number Diff line change
@@ -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 ?
Expand All @@ -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

Expand Down Expand Up @@ -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]")]
Expand Down
12 changes: 6 additions & 6 deletions docs/Redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?

Expand All @@ -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
Expand All @@ -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
Expand All @@ -61,7 +61,7 @@ public class Startup
}
```

And what we add in `appsettings.json` are as following:
`appsettings.json` example:

```JSON
"easycaching": {
Expand Down Expand Up @@ -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]")]
Expand Down
2 changes: 1 addition & 1 deletion docs/SQLite.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down