diff --git a/.travis.yml b/.travis.yml
index ddbfc185..34ba6b37 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,7 @@ language: csharp
solution: EasyCaching.sln
dist: bionic
sudo: required
-dotnet: 3.0.100
+dotnet: 3.1.100
mono: none
services:
diff --git a/build/releasenotes.props b/build/releasenotes.props
index a26f4e16..05f07cd5 100644
--- a/build/releasenotes.props
+++ b/build/releasenotes.props
@@ -1,20 +1,19 @@
- 1. Redis provider support some geo methods.
+ 1. Upgrading dependencies.
1. Upgrading dependencies.
- 1. Support some geo methods.
+ 1. Upgrading dependencies.
1. Upgrading dependencies.
- 1. Fix datetime exception.
- 2. Upgrading dependencies.
+ 1. Upgrading dependencies.
1. Upgrading dependencies.
@@ -38,7 +37,7 @@
1. Upgrading dependencies.
- 1. Support some geo methods.
+ 1. Upgrading dependencies.
1. Upgrading dependencies.
diff --git a/build/version.props b/build/version.props
index f1d1c1a9..e7b6d531 100644
--- a/build/version.props
+++ b/build/version.props
@@ -1,21 +1,21 @@
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
- 0.8.3
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
+ 0.8.5
diff --git a/sample/EasyCaching.Demo.Interceptors/EasyCaching.Demo.Interceptors.csproj b/sample/EasyCaching.Demo.Interceptors/EasyCaching.Demo.Interceptors.csproj
index af14804c..cd0a9395 100644
--- a/sample/EasyCaching.Demo.Interceptors/EasyCaching.Demo.Interceptors.csproj
+++ b/sample/EasyCaching.Demo.Interceptors/EasyCaching.Demo.Interceptors.csproj
@@ -8,6 +8,10 @@
+
+
+
+
diff --git a/sample/EasyCaching.Demo.Interceptors/Program.cs b/sample/EasyCaching.Demo.Interceptors/Program.cs
index 4931eb5c..55267d0b 100644
--- a/sample/EasyCaching.Demo.Interceptors/Program.cs
+++ b/sample/EasyCaching.Demo.Interceptors/Program.cs
@@ -1,6 +1,7 @@
namespace EasyCaching.Demo.Interceptors
{
using AspectCore.Extensions.DependencyInjection;
+ using AspectCore.Extensions.Hosting;
using Autofac.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
@@ -18,10 +19,10 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
{
webBuilder.UseStartup();
})
- // for aspcectcore
- .UseServiceProviderFactory(new AspectCoreServiceProviderFactory())
- //// for castle
- //.UseServiceProviderFactory(new AutofacServiceProviderFactory())
+ // for aspcectcore
+ .UseServiceContext()
+ //// for castle
+ //.UseServiceProviderFactory(new AutofacServiceProviderFactory())
;
}
}
diff --git a/sample/EasyCaching.Demo.Interceptors/Startup.cs b/sample/EasyCaching.Demo.Interceptors/Startup.cs
index ab135962..6218eabc 100644
--- a/sample/EasyCaching.Demo.Interceptors/Startup.cs
+++ b/sample/EasyCaching.Demo.Interceptors/Startup.cs
@@ -1,6 +1,6 @@
namespace EasyCaching.Demo.Interceptors
{
- using AspectCore.Injector;
+ using AspectCore.Extensions.DependencyInjection;
using Autofac;
using EasyCaching.Core;
using EasyCaching.Demo.Interceptors.Services;
@@ -51,11 +51,11 @@ public void ConfigureServices(IServiceCollection services)
}
#region ConfigureContainer should be only one
- // for aspectcore
- public void ConfigureContainer(IServiceContainer builder)
- {
- builder.ConfigureAspectCoreInterceptor();
- }
+ //// for aspectcore
+ //public void ConfigureContainer(IServiceContainer builder)
+ //{
+ // builder.ConfigureAspectCoreInterceptor();
+ //}
//// ConfigureContainer is where you can register things directly
//// with Autofac. This runs after ConfigureServices so the things
diff --git a/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj b/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj
index 91677a7c..c35dcd3b 100644
--- a/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj
+++ b/src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj
@@ -31,7 +31,7 @@
-
+
diff --git a/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj b/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj
index 864d3e44..1d65fc50 100644
--- a/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj
+++ b/src/EasyCaching.Bus.RabbitMQ/EasyCaching.Bus.RabbitMQ.csproj
@@ -36,6 +36,6 @@
-
+
diff --git a/src/EasyCaching.CSRedis/DefaultCSRedisCachingProvider.Set.cs b/src/EasyCaching.CSRedis/DefaultCSRedisCachingProvider.Set.cs
index 3c2ab78d..51606dbf 100755
--- a/src/EasyCaching.CSRedis/DefaultCSRedisCachingProvider.Set.cs
+++ b/src/EasyCaching.CSRedis/DefaultCSRedisCachingProvider.Set.cs
@@ -25,7 +25,7 @@ public long SAdd(string cacheKey, IList cacheValues, TimeSpan? expiration
if (expiration.HasValue)
{
- _cache.Expire(cacheKey, expiration.Value.Seconds);
+ _cache.Expire(cacheKey, (int)expiration.Value.TotalSeconds);
}
return len;
@@ -131,7 +131,7 @@ public async Task SAddAsync(string cacheKey, IList cacheValues, Time
if (expiration.HasValue)
{
- await _cache.ExpireAsync(cacheKey, expiration.Value.Seconds);
+ await _cache.ExpireAsync(cacheKey, (int)expiration.Value.TotalSeconds);
}
return len;
diff --git a/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj b/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj
index 45ed9f95..14245854 100644
--- a/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj
+++ b/src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj
@@ -31,7 +31,7 @@
-
+
diff --git a/src/EasyCaching.Core/EasyCaching.Core.csproj b/src/EasyCaching.Core/EasyCaching.Core.csproj
index 9500506f..f04ed930 100644
--- a/src/EasyCaching.Core/EasyCaching.Core.csproj
+++ b/src/EasyCaching.Core/EasyCaching.Core.csproj
@@ -31,9 +31,9 @@
-
-
-
-
+
+
+
+
diff --git a/src/EasyCaching.Disk/DefaultDiskCachingProvider.Async.cs b/src/EasyCaching.Disk/DefaultDiskCachingProvider.Async.cs
index a034a7ba..7374c860 100644
--- a/src/EasyCaching.Disk/DefaultDiskCachingProvider.Async.cs
+++ b/src/EasyCaching.Disk/DefaultDiskCachingProvider.Async.cs
@@ -6,7 +6,8 @@
using System.Linq;
using System.Threading.Tasks;
using EasyCaching.Core;
- using MessagePack;
+ using MessagePack;
+ using MessagePack.Resolvers;
using Microsoft.Extensions.Logging;
public partial class DefaultDiskCachingProvider : EasyCachingAbstractProvider
@@ -63,7 +64,7 @@ public override async Task>> BaseGetAllAsync DateTimeOffset.UtcNow)
{
- var t = MessagePackSerializer.Deserialize(cached.Value, MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ var t = MessagePackSerializer.Deserialize(cached.Value, MessagePackSerializerOptions.Standard.WithResolver(ContractlessStandardResolver.Instance));
if (!dict.ContainsKey(item))
{
@@ -92,12 +93,19 @@ public override async Task> BaseGetAsync(string cacheKey, Func<
if (File.Exists(path))
{
- //var cached = await GetDiskCacheValueAsync(path);
- var cached = GetDiskCacheValue(path);
+ /*
+ GetAsync_Parallel_Should_Succeed always failed in CI due to this reason, but succeed in local PC
+
+ MessagePack.MessagePackSerializationException : Failed to deserialize EasyCaching.Disk.DiskCacheValue value.
+ ---- System.IO.EndOfStreamException : Attempted to read past the end of the stream.
+ */
+ var cached = await GetDiskCacheValueAsync(path);
+ //var cached = GetDiskCacheValueAsync(path).ConfigureAwait(false).GetAwaiter().GetResult();
+ //var cached = GetDiskCacheValue(path);
if (cached.Expiration > DateTimeOffset.UtcNow)
{
- var t = MessagePackSerializer.Deserialize(cached.Value, MessagePack.Resolvers.ContractlessStandardResolver.Instance);
+ var t = MessagePackSerializer.Deserialize(cached.Value, MessagePackSerializerOptions.Standard.WithResolver(ContractlessStandardResolver.Instance));
if (_options.EnableLogging)
_logger?.LogInformation($"Cache Hit : cachekey = {cacheKey}");
@@ -162,7 +170,7 @@ public override async Task