Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.5.4 release #98

Merged
merged 11 commits into from Mar 19, 2019
20 changes: 17 additions & 3 deletions build/releasenotes.props
@@ -1,41 +1,55 @@
<Project>
<PropertyGroup>
<EasyCachingCorePackageNotes>
1. Support diagnostics.
2. Interceptor should generate valid cache key for basic type parameters
1. Modity diagnostics.
2. Add EasyCachingInterceptorOptions
3. Add hight availability configuration for Interceptor
</EasyCachingCorePackageNotes>
<EasyCachingMemcachedPackageNotes>
1. Update EasyCaching.Core.
2. Remove AddDefaultMemcached related extension methods
</EasyCachingMemcachedPackageNotes>
<EasyCachingRedisPackageNotes>
1. Update EasyCaching.Core.
2. Remove AddDefaultRedisCache related extension methods
</EasyCachingRedisPackageNotes>
<EasyCachingSQLitePackageNotes>
1. Update EasyCaching.Core.
2. Remove AddSQLiteCache extension method
</EasyCachingSQLitePackageNotes>
<EasyCachingInMemoryPackageNotes>
1. Update EasyCaching.Core.
2. Remove AddDefaultInMemoryCache related extension methods
3. Remove key prefix for different instance
</EasyCachingInMemoryPackageNotes>
<EasyCachingHybridPackageNotes>
1. Update EasyCaching.Core.
2. Add distributed cache providers and local cache providers configuration.
</EasyCachingHybridPackageNotes>
<EasyCachingAspectCorePackageNotes>
1. Update EasyCaching.Core.
2. Add hight availability configuration
3. Add provider configuration.
</EasyCachingAspectCorePackageNotes>
<EasyCachingCastlePackageNotes>
1. Update EasyCaching.Core.
2. Add hight availability configuration
3. Add provider Configuration.
</EasyCachingCastlePackageNotes>
<EasyCachingResponseCachingPackageNotes>
1. Update EasyCaching.Core.
</EasyCachingResponseCachingPackageNotes>
<EasyCachingJsonPackageNotes>
1. Update EasyCaching.Core.
2. Remove AddDefaultJsonSerializer extension method
</EasyCachingJsonPackageNotes>
<EasyCachingMessagePackPackageNotes>
1. Update EasyCaching.Core.
1. Update EasyCaching.Core.
2. Remove AddDefaultMessagePackSerializer extension method
</EasyCachingMessagePackPackageNotes>
<EasyCachingProtobufPackageNotes>
1. Update EasyCaching.Core.
2. Remove AddDefaultProtobufSerializer extension method
</EasyCachingProtobufPackageNotes>
<EasyCachingCSRedisPackageNotes>
1. Update EasyCaching.Core.
Expand Down
32 changes: 16 additions & 16 deletions build/version.props
@@ -1,20 +1,20 @@
<Project>
<PropertyGroup>
<EasyCachingCorePackageVersion>0.5.3</EasyCachingCorePackageVersion>
<EasyCachingMemcachedPackageVersion>0.5.3</EasyCachingMemcachedPackageVersion>
<EasyCachingRedisPackageVersion>0.5.3</EasyCachingRedisPackageVersion>
<EasyCachingSQLitePackageVersion>0.5.3</EasyCachingSQLitePackageVersion>
<EasyCachingInMemoryPackageVersion>0.5.3</EasyCachingInMemoryPackageVersion>
<EasyCachingHybridPackageVersion>0.5.3</EasyCachingHybridPackageVersion>
<EasyCachingAspectCorePackageVersion>0.5.3</EasyCachingAspectCorePackageVersion>
<EasyCachingCastlePackageVersion>0.5.3</EasyCachingCastlePackageVersion>
<EasyCachingResponseCachingPackageVersion>0.5.3</EasyCachingResponseCachingPackageVersion>
<EasyCachingJsonPackageVersion>0.5.3</EasyCachingJsonPackageVersion>
<EasyCachingMessagePackPackageVersion>0.5.3</EasyCachingMessagePackPackageVersion>
<EasyCachingProtobufPackageVersion>0.5.3</EasyCachingProtobufPackageVersion>
<EasyCachingCSRedisPackageVersion>0.5.3</EasyCachingCSRedisPackageVersion>
<EasyCachingRedisBusPackageVersion>0.5.3</EasyCachingRedisBusPackageVersion>
<EasyCachingCSRedisBusPackageVersion>0.5.3</EasyCachingCSRedisBusPackageVersion>
<EasyCachingRabbitBusPackageVersion>0.5.3</EasyCachingRabbitBusPackageVersion>
<EasyCachingCorePackageVersion>0.5.4</EasyCachingCorePackageVersion>
<EasyCachingMemcachedPackageVersion>0.5.4</EasyCachingMemcachedPackageVersion>
<EasyCachingRedisPackageVersion>0.5.4</EasyCachingRedisPackageVersion>
<EasyCachingSQLitePackageVersion>0.5.4</EasyCachingSQLitePackageVersion>
<EasyCachingInMemoryPackageVersion>0.5.4</EasyCachingInMemoryPackageVersion>
<EasyCachingHybridPackageVersion>0.5.4</EasyCachingHybridPackageVersion>
<EasyCachingAspectCorePackageVersion>0.5.4</EasyCachingAspectCorePackageVersion>
<EasyCachingCastlePackageVersion>0.5.4</EasyCachingCastlePackageVersion>
<EasyCachingResponseCachingPackageVersion>0.5.4</EasyCachingResponseCachingPackageVersion>
<EasyCachingJsonPackageVersion>0.5.4</EasyCachingJsonPackageVersion>
<EasyCachingMessagePackPackageVersion>0.5.4</EasyCachingMessagePackPackageVersion>
<EasyCachingProtobufPackageVersion>0.5.4</EasyCachingProtobufPackageVersion>
<EasyCachingCSRedisPackageVersion>0.5.4</EasyCachingCSRedisPackageVersion>
<EasyCachingRedisBusPackageVersion>0.5.4</EasyCachingRedisBusPackageVersion>
<EasyCachingCSRedisBusPackageVersion>0.5.4</EasyCachingCSRedisBusPackageVersion>
<EasyCachingRabbitBusPackageVersion>0.5.4</EasyCachingRabbitBusPackageVersion>
</PropertyGroup>
</Project>
10 changes: 7 additions & 3 deletions docs/AspectCore.md
Expand Up @@ -72,7 +72,11 @@ public class Startup
{
services.AddScoped<IDemoService, DemoService>();

services.AddDefaultInMemoryCache();
services.AddEasyCaching(option=>
{
//use memory cache
option.UseInMemory("default");
});

services.AddMvc();

Expand Down Expand Up @@ -101,7 +105,7 @@ public class ValuesController : Controller
{
if(type == 1)
{
return _service.GetCurrentUtcTime();
return _service.GetCurrentUtcTime();
}
else if(type == 2)
{
Expand All @@ -115,7 +119,7 @@ public class ValuesController : Controller
else
{
return "other";
}
}
}
}
```
7 changes: 3 additions & 4 deletions docs/CSRedis.md
Expand Up @@ -24,12 +24,12 @@ First of all, we can config by C# code.
public class Startup
{
//...

public void ConfigureServices(IServiceCollection services)
{
//other services.

//Important step for Redis Caching
//Important step for Redis Caching
services.AddEasyCaching(option =>
{
option.UseCSRedis(config =>
Expand All @@ -53,13 +53,12 @@ What's more, we also can read the configuration from `appsettings.json`.
public class Startup
{
//...

public void ConfigureServices(IServiceCollection services)
{
//other services.

//Important step for Redis Caching
services.AddDefaultRedisCache(Configuration);
services.AddEasyCaching(option =>
{
option.UseCSRedis(Configuration, "myredisname", "easycaching:csredis");
Expand Down
13 changes: 9 additions & 4 deletions docs/Castle.md
Expand Up @@ -15,6 +15,7 @@ Install-Package EasyCaching.Interceptor.Castle

Install-Package EasyCaching.InMemory
```

## 2. Define services

### 2.1 Define the interface
Expand All @@ -23,7 +24,7 @@ Just define a regular interface.

```csharp
public interface IDemoService
{
{
string GetCurrentUtcTime();

string PutSomething(string str);
Expand Down Expand Up @@ -72,7 +73,11 @@ public class Startup
{
services.AddScoped<IDemoService, DemoService>();

services.AddDefaultInMemoryCache();
services.AddEasyCaching(option =>
{
//use memory cache
option.UseInMemory("default");
});

services.AddMvc();

Expand Down Expand Up @@ -101,7 +106,7 @@ public class ValuesController : Controller
{
if(type == 1)
{
return _service.GetCurrentUtcTime();
return _service.GetCurrentUtcTime();
}
else if(type == 2)
{
Expand All @@ -115,7 +120,7 @@ public class ValuesController : Controller
else
{
return "other";
}
}
}
}
```
10 changes: 6 additions & 4 deletions docs/Features.md
Expand Up @@ -12,13 +12,15 @@
9. GetByPrefix/GetByPrefixAsync
10. RemoveAll/RemoveAllAsync
11. GetCount
12. Flush/FlushAsync
12. Flush/FlushAsync
13. TrySet/TrySetAsync
- Caching Providers(Both local caching and distributed caching)
1. In-Memory
2. Memcached
3. Redis
4. SQLite
5. Hybrid
3. Redis(Based on StackExchange.Redis)
4. Redis(Based on csredis)
5. SQLite
6. Hybrid
- Caching Interceptors
1. AspectCore
2. Castle
Expand Down
13 changes: 9 additions & 4 deletions docs/Hybrid.md
Expand Up @@ -27,11 +27,11 @@ Install-Package EasyCaching.Bus.Redis
public class Startup
{
//...

public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();

services.AddEasyCaching(option =>
{
// local
Expand All @@ -44,10 +44,15 @@ public class Startup
}, "myredis");

// combine local and distributed
option.UseHybrid(config =>
option.UseHybrid(config =>
{
config.TopicName = "test-topic";
config.EnableLogging = false;

// specify the local cache provider name after v0.5.4
config.LocalCacheProviderName = "m1";
// specify the distributed cache provider name after v0.5.4
config.DistributedCacheProviderName = "myredis";
})
// use redis bus
.WithRedisBus(busConf =>
Expand Down Expand Up @@ -79,7 +84,7 @@ public class ValuesController : Controller
{
//Set
_provider.Set("demo", "123", TimeSpan.FromMinutes(1));

//others
//...
}
Expand Down
16 changes: 12 additions & 4 deletions docs/In-Memory.md
Expand Up @@ -22,13 +22,17 @@ First of all, we can config by C# code.
public class Startup
{
//...

public void ConfigureServices(IServiceCollection services)
{
//other services.

//Important step for In-Memory Caching
services.AddDefaultInMemoryCache();
services.AddEasyCaching(option =>
{
//use memory cache
option.UseInMemory("default");
});
}
}
```
Expand All @@ -39,13 +43,17 @@ What's more, we also can read the configuration from `appsettings.json`.
public class Startup
{
//...

public void ConfigureServices(IServiceCollection services)
{
//other services.

//Important step for In-Memory Caching
services.AddDefaultInMemoryCache(Configuration);
services.AddEasyCaching(option =>
{
//use memory cache
option.UseInMemory(Configuration, "default", "easycahing:inmemory");
});
}
}
```
Expand Down
33 changes: 5 additions & 28 deletions docs/Json.md
Expand Up @@ -10,7 +10,7 @@ DefaultJsonSerializer is a serializer based on **Newtonsoft.Json**.
Install-Package EasyCaching.Serialization.Json
```

## Use In EasyCaching.Redis
## Configuration

```
public class Startup
Expand All @@ -21,34 +21,11 @@ public class Startup
{
services.AddMvc();

services.AddDefaultRedisCache(option=>
{
option.Endpoints.Add(new ServerEndPoint("127.0.0.1", 6379));
option.Password = "";
services.AddEasyCaching(option =>
{
//specify to use json serializer
option.WithJson();
});
//specify to use json serializer
services.AddDefaultJsonSerializer();
}
}
```

## Use In EasyCaching.Memcached

```
public class Startup
{
//others...

public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();

services.AddDefaultMemcached(op=>
{
op.AddServer("127.0.0.1",11211);
});
//specify the Transcoder use json serializer.
services.AddDefaultJsonSerializer();
}
}
```
22 changes: 13 additions & 9 deletions docs/Memcached.md
Expand Up @@ -20,22 +20,26 @@ Install-Package EasyCaching.Memcached
public class Startup
{
//...

public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();

//Important step for Memcached Cache
services.AddDefaultMemcached(option=>
{
option.AddServer("127.0.0.1",11211);
});
services.AddEasyCaching(option =>
{
//use memmemcachedory cache
option.UseMemcached(config =>
{
config.DBConfig.AddServer("127.0.0.1", 11211);
});
});
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
//Important step for Memcache Cache
app.UseDefaultMemcached();
// Important step for Memcache Cache
app.UseEasyCaching();
}
}
```
Expand Down