From 30bdd99075fbb60985b0275c8e94c35ac3814f90 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Mon, 22 Apr 2019 06:55:49 +0800 Subject: [PATCH 01/10] :arrow_up: Update Microsoft.* to 2.2 --- .travis.yml | 2 +- .../EasyCaching.Demo.Interceptors.csproj | 2 +- sample/EasyCaching.Demo.Interceptors/Startup.cs | 2 +- .../EasyCaching.Demo.Providers.csproj | 2 +- sample/EasyCaching.Demo.Providers/Startup.cs | 4 ++-- .../EasyCaching.Demo.ResponseCaching.csproj | 2 +- sample/EasyCaching.Demo.ResponseCaching/Startup.cs | 2 +- .../EasyCaching.Bus.CSRedis.csproj | 3 +-- .../EasyCaching.Bus.RabbitMQ.csproj | 3 +-- src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj | 3 +-- src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj | 3 +-- src/EasyCaching.Core/EasyCaching.Core.csproj | 6 ++++-- .../EasyCaching.HybridCache.csproj | 5 +---- src/EasyCaching.InMemory/EasyCaching.InMemory.csproj | 4 +--- .../EasyCaching.Interceptor.AspectCore.csproj | 3 +-- .../EasyCaching.Interceptor.Castle.csproj | 3 +-- src/EasyCaching.Redis/EasyCaching.Redis.csproj | 3 +-- .../EasyCaching.ResponseCaching.csproj | 2 +- src/EasyCaching.SQLite/EasyCaching.SQLite.csproj | 4 +--- .../EasyCaching.Serialization.Json.csproj | 3 +-- .../EasyCaching.Serialization.MessagePack.csproj | 3 +-- .../EasyCaching.Serialization.Protobuf.csproj | 3 +-- .../EasyCaching.PerformanceTests.csproj | 6 +++--- test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj | 8 ++++---- 24 files changed, 33 insertions(+), 48 deletions(-) diff --git a/.travis.yml b/.travis.yml index f788195c..7998fbd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ solution: EasyCaching.sln sudo: required -dotnet: 2.1.301 +dotnet: 2.2 mono: none diff --git a/sample/EasyCaching.Demo.Interceptors/EasyCaching.Demo.Interceptors.csproj b/sample/EasyCaching.Demo.Interceptors/EasyCaching.Demo.Interceptors.csproj index e0f4ac68..9912ece2 100644 --- a/sample/EasyCaching.Demo.Interceptors/EasyCaching.Demo.Interceptors.csproj +++ b/sample/EasyCaching.Demo.Interceptors/EasyCaching.Demo.Interceptors.csproj @@ -1,7 +1,7 @@ - netcoreapp2.1 + netcoreapp2.2 diff --git a/sample/EasyCaching.Demo.Interceptors/Startup.cs b/sample/EasyCaching.Demo.Interceptors/Startup.cs index ef68ddee..1cae6c4e 100644 --- a/sample/EasyCaching.Demo.Interceptors/Startup.cs +++ b/sample/EasyCaching.Demo.Interceptors/Startup.cs @@ -43,7 +43,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services) //options.WithProtobuf(); }); - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); //1.1. all default return services.ConfigureAspectCoreInterceptor(options => options.CacheProviderName = EasyCachingConstValue.DefaultInMemoryName); diff --git a/sample/EasyCaching.Demo.Providers/EasyCaching.Demo.Providers.csproj b/sample/EasyCaching.Demo.Providers/EasyCaching.Demo.Providers.csproj index 34371c8c..08e8aaea 100644 --- a/sample/EasyCaching.Demo.Providers/EasyCaching.Demo.Providers.csproj +++ b/sample/EasyCaching.Demo.Providers/EasyCaching.Demo.Providers.csproj @@ -1,7 +1,7 @@ - netcoreapp2.1 + netcoreapp2.2 diff --git a/sample/EasyCaching.Demo.Providers/Startup.cs b/sample/EasyCaching.Demo.Providers/Startup.cs index 4c41d77d..dbd8604f 100644 --- a/sample/EasyCaching.Demo.Providers/Startup.cs +++ b/sample/EasyCaching.Demo.Providers/Startup.cs @@ -28,7 +28,7 @@ public Startup(IConfiguration configuration) public void ConfigureServices(IServiceCollection services) { - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); //new configuration services.AddEasyCaching(option=> @@ -77,7 +77,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF app.UseDeveloperExceptionPage(); } - loggerFactory.AddConsole(Configuration.GetSection("Logging")); + //loggerFactory.AddConsole(Configuration.GetSection("Logging")); // Important step for using Memcached Cache or SQLite Cache app.UseEasyCaching(); diff --git a/sample/EasyCaching.Demo.ResponseCaching/EasyCaching.Demo.ResponseCaching.csproj b/sample/EasyCaching.Demo.ResponseCaching/EasyCaching.Demo.ResponseCaching.csproj index d55aa156..9489d7f0 100644 --- a/sample/EasyCaching.Demo.ResponseCaching/EasyCaching.Demo.ResponseCaching.csproj +++ b/sample/EasyCaching.Demo.ResponseCaching/EasyCaching.Demo.ResponseCaching.csproj @@ -1,7 +1,7 @@ - netcoreapp2.1 + netcoreapp2.2 diff --git a/sample/EasyCaching.Demo.ResponseCaching/Startup.cs b/sample/EasyCaching.Demo.ResponseCaching/Startup.cs index b9c8eba2..ad67860c 100644 --- a/sample/EasyCaching.Demo.ResponseCaching/Startup.cs +++ b/sample/EasyCaching.Demo.ResponseCaching/Startup.cs @@ -21,7 +21,7 @@ public Startup(IConfiguration configuration) public void ConfigureServices(IServiceCollection services) { - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); + services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); services.AddEasyCaching(x => { x.UseInMemory(); }); services.AddEasyCachingResponseCaching(EasyCachingConstValue.DefaultInMemoryName); diff --git a/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj b/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj index 2a1831f5..cdb1ddbc 100644 --- a/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj +++ b/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj @@ -26,8 +26,7 @@ - - + diff --git a/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj b/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj index 9898bc22..41d1dfe8 100644 --- a/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj +++ b/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj @@ -29,8 +29,7 @@ - - + diff --git a/src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj b/src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj index b034f310..33efe2aa 100644 --- a/src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj +++ b/src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj @@ -26,8 +26,7 @@ - - + diff --git a/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj b/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj index 9a0e6de0..b91cc182 100644 --- a/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj +++ b/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj @@ -26,8 +26,7 @@ - - + diff --git a/src/EasyCaching.Core/EasyCaching.Core.csproj b/src/EasyCaching.Core/EasyCaching.Core.csproj index f414a230..3f3e1ed3 100644 --- a/src/EasyCaching.Core/EasyCaching.Core.csproj +++ b/src/EasyCaching.Core/EasyCaching.Core.csproj @@ -36,8 +36,10 @@ - - + + + + diff --git a/src/EasyCaching.HybridCache/EasyCaching.HybridCache.csproj b/src/EasyCaching.HybridCache/EasyCaching.HybridCache.csproj index 271ece1f..526ba49f 100644 --- a/src/EasyCaching.HybridCache/EasyCaching.HybridCache.csproj +++ b/src/EasyCaching.HybridCache/EasyCaching.HybridCache.csproj @@ -28,10 +28,7 @@ - - - - + diff --git a/src/EasyCaching.InMemory/EasyCaching.InMemory.csproj b/src/EasyCaching.InMemory/EasyCaching.InMemory.csproj index bea337c4..decf6910 100644 --- a/src/EasyCaching.InMemory/EasyCaching.InMemory.csproj +++ b/src/EasyCaching.InMemory/EasyCaching.InMemory.csproj @@ -28,9 +28,7 @@ - - - + diff --git a/src/EasyCaching.Interceptor.AspectCore/EasyCaching.Interceptor.AspectCore.csproj b/src/EasyCaching.Interceptor.AspectCore/EasyCaching.Interceptor.AspectCore.csproj index 6d299b57..6c53ce31 100644 --- a/src/EasyCaching.Interceptor.AspectCore/EasyCaching.Interceptor.AspectCore.csproj +++ b/src/EasyCaching.Interceptor.AspectCore/EasyCaching.Interceptor.AspectCore.csproj @@ -30,7 +30,6 @@ - - + diff --git a/src/EasyCaching.Interceptor.Castle/EasyCaching.Interceptor.Castle.csproj b/src/EasyCaching.Interceptor.Castle/EasyCaching.Interceptor.Castle.csproj index b5c76443..258addb0 100644 --- a/src/EasyCaching.Interceptor.Castle/EasyCaching.Interceptor.Castle.csproj +++ b/src/EasyCaching.Interceptor.Castle/EasyCaching.Interceptor.Castle.csproj @@ -33,7 +33,6 @@ - - + diff --git a/src/EasyCaching.Redis/EasyCaching.Redis.csproj b/src/EasyCaching.Redis/EasyCaching.Redis.csproj index 029724dd..e88907d5 100644 --- a/src/EasyCaching.Redis/EasyCaching.Redis.csproj +++ b/src/EasyCaching.Redis/EasyCaching.Redis.csproj @@ -26,8 +26,7 @@ - - + diff --git a/src/EasyCaching.ResponseCaching/EasyCaching.ResponseCaching.csproj b/src/EasyCaching.ResponseCaching/EasyCaching.ResponseCaching.csproj index 499f9509..b48d8e02 100644 --- a/src/EasyCaching.ResponseCaching/EasyCaching.ResponseCaching.csproj +++ b/src/EasyCaching.ResponseCaching/EasyCaching.ResponseCaching.csproj @@ -29,6 +29,6 @@ - + diff --git a/src/EasyCaching.SQLite/EasyCaching.SQLite.csproj b/src/EasyCaching.SQLite/EasyCaching.SQLite.csproj index 64c8f500..d7c02109 100644 --- a/src/EasyCaching.SQLite/EasyCaching.SQLite.csproj +++ b/src/EasyCaching.SQLite/EasyCaching.SQLite.csproj @@ -31,9 +31,7 @@ - - - + diff --git a/src/EasyCaching.Serialization.Json/EasyCaching.Serialization.Json.csproj b/src/EasyCaching.Serialization.Json/EasyCaching.Serialization.Json.csproj index fdafa7b7..4ca00798 100644 --- a/src/EasyCaching.Serialization.Json/EasyCaching.Serialization.Json.csproj +++ b/src/EasyCaching.Serialization.Json/EasyCaching.Serialization.Json.csproj @@ -30,8 +30,7 @@ - - + diff --git a/src/EasyCaching.Serialization.MessagePack/EasyCaching.Serialization.MessagePack.csproj b/src/EasyCaching.Serialization.MessagePack/EasyCaching.Serialization.MessagePack.csproj index c70b5182..050e9906 100644 --- a/src/EasyCaching.Serialization.MessagePack/EasyCaching.Serialization.MessagePack.csproj +++ b/src/EasyCaching.Serialization.MessagePack/EasyCaching.Serialization.MessagePack.csproj @@ -29,8 +29,7 @@ - - + diff --git a/src/EasyCaching.Serialization.Protobuf/EasyCaching.Serialization.Protobuf.csproj b/src/EasyCaching.Serialization.Protobuf/EasyCaching.Serialization.Protobuf.csproj index 75b53130..bfa68cf8 100644 --- a/src/EasyCaching.Serialization.Protobuf/EasyCaching.Serialization.Protobuf.csproj +++ b/src/EasyCaching.Serialization.Protobuf/EasyCaching.Serialization.Protobuf.csproj @@ -29,8 +29,7 @@ - - + diff --git a/test/EasyCaching.PerformanceTests/EasyCaching.PerformanceTests.csproj b/test/EasyCaching.PerformanceTests/EasyCaching.PerformanceTests.csproj index 6a29166c..488d9ea2 100644 --- a/test/EasyCaching.PerformanceTests/EasyCaching.PerformanceTests.csproj +++ b/test/EasyCaching.PerformanceTests/EasyCaching.PerformanceTests.csproj @@ -2,13 +2,13 @@ Exe - netcoreapp2.1 + netcoreapp2.2 - - + + diff --git a/test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj b/test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj index 0858e4d6..93f0f51a 100644 --- a/test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj +++ b/test/EasyCaching.UnitTests/EasyCaching.UnitTests.csproj @@ -1,7 +1,7 @@ - netcoreapp2.1 + netcoreapp2.2 false @@ -11,9 +11,9 @@ - - - + + + From 943cca88fcc2642163e522e9655065053a2a605f Mon Sep 17 00:00:00 2001 From: catcherwong Date: Mon, 22 Apr 2019 22:02:02 +0800 Subject: [PATCH 02/10] :green_heart: travis ci --- .travis.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7998fbd0..164116e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,8 @@ language: csharp - solution: EasyCaching.sln - -sudo: required - +dist: xenial +sudo: required dotnet: 2.2 - mono: none services: From 16b0e5bcb8073961966ac8bb24ffed86f17b5539 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Mon, 22 Apr 2019 22:23:34 +0800 Subject: [PATCH 03/10] :green_heart: dotnet 2.2.203 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 164116e3..6fd6a058 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: csharp solution: EasyCaching.sln dist: xenial sudo: required -dotnet: 2.2 +dotnet: 2.2.203 mono: none services: From 26a626e0cfba6fdc3fc0ea6f4f408f751d4e8f9f Mon Sep 17 00:00:00 2001 From: catcherwong Date: Tue, 23 Apr 2019 22:12:00 +0800 Subject: [PATCH 04/10] :arrow_up: Upgrading dependencies --- src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj | 2 +- .../EasyCaching.Bus.RabbitMQ.csproj | 4 ++-- src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj | 2 +- src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj | 2 +- .../EasyCaching.Interceptor.AspectCore.csproj | 4 ++-- .../EasyCaching.Interceptor.Castle.csproj | 6 +++--- src/EasyCaching.Memcached/EasyCaching.Memcached.csproj | 2 +- src/EasyCaching.Redis/EasyCaching.Redis.csproj | 2 +- src/EasyCaching.SQLite/EasyCaching.SQLite.csproj | 6 +++--- .../EasyCaching.Serialization.Json.csproj | 2 +- .../EasyCaching.Serialization.Protobuf.csproj | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj b/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj index cdb1ddbc..2f2d10af 100644 --- a/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj +++ b/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj b/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj index 41d1dfe8..2df0a2e4 100644 --- a/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj +++ b/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj @@ -29,8 +29,8 @@ - - + + diff --git a/src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj b/src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj index 33efe2aa..a9e2e243 100644 --- a/src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj +++ b/src/EasyCaching.Bus.Redis/EasyCaching.Bus.Redis.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj b/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj index b91cc182..8630aa45 100644 --- a/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj +++ b/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/EasyCaching.Interceptor.AspectCore/EasyCaching.Interceptor.AspectCore.csproj b/src/EasyCaching.Interceptor.AspectCore/EasyCaching.Interceptor.AspectCore.csproj index 6c53ce31..41b15135 100644 --- a/src/EasyCaching.Interceptor.AspectCore/EasyCaching.Interceptor.AspectCore.csproj +++ b/src/EasyCaching.Interceptor.AspectCore/EasyCaching.Interceptor.AspectCore.csproj @@ -29,7 +29,7 @@ - - + + diff --git a/src/EasyCaching.Interceptor.Castle/EasyCaching.Interceptor.Castle.csproj b/src/EasyCaching.Interceptor.Castle/EasyCaching.Interceptor.Castle.csproj index 258addb0..e90942c5 100644 --- a/src/EasyCaching.Interceptor.Castle/EasyCaching.Interceptor.Castle.csproj +++ b/src/EasyCaching.Interceptor.Castle/EasyCaching.Interceptor.Castle.csproj @@ -29,10 +29,10 @@ - + - - + + diff --git a/src/EasyCaching.Memcached/EasyCaching.Memcached.csproj b/src/EasyCaching.Memcached/EasyCaching.Memcached.csproj index 38336de3..06b46b56 100644 --- a/src/EasyCaching.Memcached/EasyCaching.Memcached.csproj +++ b/src/EasyCaching.Memcached/EasyCaching.Memcached.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/EasyCaching.Redis/EasyCaching.Redis.csproj b/src/EasyCaching.Redis/EasyCaching.Redis.csproj index e88907d5..93dea6df 100644 --- a/src/EasyCaching.Redis/EasyCaching.Redis.csproj +++ b/src/EasyCaching.Redis/EasyCaching.Redis.csproj @@ -26,7 +26,7 @@ - + diff --git a/src/EasyCaching.SQLite/EasyCaching.SQLite.csproj b/src/EasyCaching.SQLite/EasyCaching.SQLite.csproj index d7c02109..7a20e78a 100644 --- a/src/EasyCaching.SQLite/EasyCaching.SQLite.csproj +++ b/src/EasyCaching.SQLite/EasyCaching.SQLite.csproj @@ -29,9 +29,9 @@ - - - + + + diff --git a/src/EasyCaching.Serialization.Json/EasyCaching.Serialization.Json.csproj b/src/EasyCaching.Serialization.Json/EasyCaching.Serialization.Json.csproj index 4ca00798..1ba7f982 100644 --- a/src/EasyCaching.Serialization.Json/EasyCaching.Serialization.Json.csproj +++ b/src/EasyCaching.Serialization.Json/EasyCaching.Serialization.Json.csproj @@ -30,7 +30,7 @@ - + diff --git a/src/EasyCaching.Serialization.Protobuf/EasyCaching.Serialization.Protobuf.csproj b/src/EasyCaching.Serialization.Protobuf/EasyCaching.Serialization.Protobuf.csproj index bfa68cf8..6ea03e9c 100644 --- a/src/EasyCaching.Serialization.Protobuf/EasyCaching.Serialization.Protobuf.csproj +++ b/src/EasyCaching.Serialization.Protobuf/EasyCaching.Serialization.Protobuf.csproj @@ -29,7 +29,7 @@ - + From 966d4d692660126945e34efbe8bbc75f14cfd467 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Tue, 23 Apr 2019 22:19:21 +0800 Subject: [PATCH 05/10] :wheelchair: Add multi redis sample --- .../Controllers/MultiRedisController.cs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sample/EasyCaching.Demo.Providers/Controllers/MultiRedisController.cs diff --git a/sample/EasyCaching.Demo.Providers/Controllers/MultiRedisController.cs b/sample/EasyCaching.Demo.Providers/Controllers/MultiRedisController.cs new file mode 100644 index 00000000..38a32554 --- /dev/null +++ b/sample/EasyCaching.Demo.Providers/Controllers/MultiRedisController.cs @@ -0,0 +1,30 @@ +namespace EasyCaching.Demo.Providers.Controllers +{ + using EasyCaching.Core; + using Microsoft.AspNetCore.Mvc; + + [Route("api/mredis")] + public class MultiRedisController : Controller + { + private readonly IRedisCachingProvider _redis1; + private readonly IRedisCachingProvider _redis2; + + public MultiRedisController(IEasyCachingProviderFactory factory) + { + this._redis1 = factory.GetRedisProvider("redis1"); + this._redis2 = factory.GetRedisProvider("redis2"); + } + + // GET api/mredis + [HttpGet] + public string Get() + { + _redis1.StringSet("keyredis1", "val"); + + var res1 = _redis1.StringGet("keyredis1"); + var res2 = _redis2.StringGet("keyredis1"); + + return $"redis1 cached value: {res1}, redis2 cached value : {res2}"; + } + } +} From d04c11f64fc6e2e1518077bd4a7c585640bfd701 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Tue, 23 Apr 2019 22:22:44 +0800 Subject: [PATCH 06/10] :bookmark: v0.5.5-beta --- build/releasenotes.props | 40 +++++++++++++++------------------------- build/version.props | 32 ++++++++++++++++---------------- 2 files changed, 31 insertions(+), 41 deletions(-) diff --git a/build/releasenotes.props b/build/releasenotes.props index 104d8b01..1c351811 100644 --- a/build/releasenotes.props +++ b/build/releasenotes.props @@ -1,59 +1,49 @@ - 1. Add GetExpiration/GetExpirationAsync for caching provider. - 2. IEasyCachingProviderFactory support multi redis provider instances. - 3. IRedisCachingProvider add some string and keys methods. - 4. Interceptor attribute add cache provider + 1. Upgrading dependencies. - 1. Add GetExpiration/GetExpirationAsync for caching provider. + 1. Upgrading dependencies. - 1. Add GetExpiration/GetExpirationAsync for caching provider. - 2. Add some string and keys methods. + 1. Upgrading dependencies. - 1. Add GetExpiration/GetExpirationAsync for caching provider. + 1. Upgrading dependencies. - 1. Add GetExpiration/GetExpirationAsync for caching provider. + 1. Upgrading dependencies. - 1. Add DefaultExpirationForTtlFailed for HybridCachingOptions. - 2. Get distributed cached item's expiration when local cache is null. + 1. Upgrading dependencies. - 1. Update EasyCaching.Core. - 2. Swich caching provider via attribute. - 3. Handle exception when method return null. + 1. Upgrading dependencies. - 1. Update EasyCaching.Core. - 2. Swich caching provider via attribute. - 3. Handle exception when method return null. + 1. Upgrading dependencies. - 1. Update EasyCaching.Core. + 1. Upgrading dependencies. - 1. Update EasyCaching.Core. + 1. Upgrading dependencies. - 1. Update EasyCaching.Core. + 1. Upgrading dependencies. - 1. Update EasyCaching.Core. + 1. Upgrading dependencies. - 1. Add GetExpiration/GetExpirationAsync for caching provider. - 2. Add some string and keys methods. + 1. Upgrading dependencies. - 1. Update EasyCaching.Core. + 1. Upgrading dependencies. - 1. Update EasyCaching.Core. + 1. Upgrading dependencies. diff --git a/build/version.props b/build/version.props index c2a20e97..a577c92a 100644 --- a/build/version.props +++ b/build/version.props @@ -1,20 +1,20 @@ - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 - 0.5.4.2 + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta + 0.5.5-beta From cb56fc764666d882d4a97354bd7f415260ae1728 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Tue, 23 Apr 2019 22:25:07 +0800 Subject: [PATCH 07/10] :fire: Remove useless code --- src/EasyCaching.Core/Configurations/EasyCachingOptions.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/EasyCaching.Core/Configurations/EasyCachingOptions.cs b/src/EasyCaching.Core/Configurations/EasyCachingOptions.cs index 7dc642b2..4a972435 100644 --- a/src/EasyCaching.Core/Configurations/EasyCachingOptions.cs +++ b/src/EasyCaching.Core/Configurations/EasyCachingOptions.cs @@ -1,6 +1,5 @@ namespace EasyCaching.Core.Configurations { - using System; using System.Collections.Generic; /// @@ -32,10 +31,5 @@ public void RegisterExtension(IEasyCachingOptionsExtension extension) Extensions.Add(extension); } - - public void UseCSRedis(Func p, string v) - { - throw new NotImplementedException(); - } } } From 213a954d52c7c121b1703f4a8d21311ad49c31d6 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Sat, 27 Apr 2019 18:02:55 +0800 Subject: [PATCH 08/10] :memo: Update usages --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index defa09bb..0963906d 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,26 @@ public class Startup //use memory cache that named default option.UseInMemory("default"); + // // use memory cache with your own configuration + // config.UseInMemory(options => + // { + // options.DBConfig = new InMemoryCachingOptions + // { + // // scan time, default value is 60s + // ExpirationScanFrequency = 60, + // // total count of cache items, default value is 10000 + // SizeLimit = 100 + // }; + // // the max random second will be added to cache's expiration, default value is 120 + // options.MaxRdSecond = 120; + // // whether enable logging, default is false + // options.EnableLogging = false; + // // mutex key's alive time(ms), default is 5000 + // options.LockMs = 5000; + // // when mutex key alive, it will sleep some time, default is 300 + // options.SleepMs = 300; + // }, "m2"); + //use redis cache that named redis1 option.UseRedis(config => { From 58bc913216a0027225541febe98720b72175fa71 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Sat, 27 Apr 2019 18:03:27 +0800 Subject: [PATCH 09/10] :memo: Add GetRedisProvider for factory --- docs/ProviderFactory.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/ProviderFactory.md b/docs/ProviderFactory.md index c4be185a..a2b41f5f 100644 --- a/docs/ProviderFactory.md +++ b/docs/ProviderFactory.md @@ -14,6 +14,8 @@ 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. + Here use two InMemory caching provders and two Redis caching providers to show. ## 1. Install the packages via Nuget @@ -116,5 +118,21 @@ public class ValuesController : Controller Console.WriteLine($"Type=redis2,Key=named-provider,Value={res},Time:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); return $"cached value : {res}"; } + + // GET api/values/redis3 + [HttpGet] + [Route("redis3")] + public string GetRedis3() + { + var redis1 = factory.GetRedisProvider("redis1"); + var redis2 = factory.GetRedisProvider("redis2"); + + _redis1.StringSet("keyredis1", "val"); + + var res1 = _redis1.StringGet("keyredis1"); + var res2 = _redis2.StringGet("keyredis1"); + + return $"redis1 cached value: {res1}, redis2 cached value : {res2}"; + } } ``` From 83d9913e799c225ab769e06eb69a3f98e23783c8 Mon Sep 17 00:00:00 2001 From: catcherwong Date: Sat, 27 Apr 2019 18:06:04 +0800 Subject: [PATCH 10/10] :bookmark: v0.5.5 --- build/version.props | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/build/version.props b/build/version.props index a577c92a..d2e7dc0a 100644 --- a/build/version.props +++ b/build/version.props @@ -1,20 +1,20 @@ - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta - 0.5.5-beta + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5 + 0.5.5