Skip to content

Commit

Permalink
Merge pull request #182 from dotnetcore/dev
Browse files Browse the repository at this point in the history
Upgrading dependencies and fixed some bug
  • Loading branch information
catcherwong authored Dec 15, 2019
2 parents 638c6f9 + 58d9136 commit 82dd4e1
Show file tree
Hide file tree
Showing 18 changed files with 551 additions and 117 deletions.
101 changes: 18 additions & 83 deletions build/releasenotes.props
Original file line number Diff line number Diff line change
@@ -1,121 +1,56 @@
<Project>
<PropertyGroup>
<EasyCachingCorePackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Redis provider support some geo methods.
</EasyCachingCorePackageNotes>
<EasyCachingMemcachedPackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingMemcachedPackageNotes>
<EasyCachingRedisPackageNotes>
1. Support Hyperloglog.
1. Support some geo methods.
</EasyCachingRedisPackageNotes>
<EasyCachingSQLitePackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingSQLitePackageNotes>
<EasyCachingInMemoryPackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Fix datetime exception.
2. Upgrading dependencies.
</EasyCachingInMemoryPackageNotes>
<EasyCachingHybridPackageNotes>
1. improve hybrid get with data retriever.
1. Upgrading dependencies.
</EasyCachingHybridPackageNotes>
<EasyCachingAspectCorePackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingAspectCorePackageNotes>
<EasyCachingCastlePackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingCastlePackageNotes>
<EasyCachingResponseCachingPackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingResponseCachingPackageNotes>
<EasyCachingJsonPackageNotes>
1. Support JsonSerializerSettings.
1. Upgrading dependencies.
</EasyCachingJsonPackageNotes>
<EasyCachingMessagePackPackageNotes>
1. Support custom resolver.
1. Upgrading dependencies.
</EasyCachingMessagePackPackageNotes>
<EasyCachingProtobufPackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingProtobufPackageNotes>
<EasyCachingCSRedisPackageNotes>
1. Support Hyperloglog.
1. Support some geo methods.
</EasyCachingCSRedisPackageNotes>
<EasyCachingCSRedisBusPackageNotes>
1. Support sentinel mode.
1. Upgrading dependencies.
</EasyCachingCSRedisBusPackageNotes>
<EasyCachingRedisBusPackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingRedisBusPackageNotes>
<EasyCachingRabbitBusPackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingRabbitBusPackageNotes>
<EasyCachingDiskPackageNotes>
1. Make Interceptors and response caching Support .netcore3.0.
2. Remove WithServices method to support console apps.
3. Improve RabbitMQ bus.
4. Add deep clone for memory cache provider.
5. Support multi instances of hybrid provider.
6. Upgrading dependencies.
7. Modify some extension methods' namespace.
1. Upgrading dependencies.
</EasyCachingDiskPackageNotes>
</PropertyGroup>
</Project>
34 changes: 17 additions & 17 deletions build/version.props
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project>
<PropertyGroup>
<EasyCachingCorePackageVersion>0.8.0</EasyCachingCorePackageVersion>
<EasyCachingMemcachedPackageVersion>0.8.0</EasyCachingMemcachedPackageVersion>
<EasyCachingRedisPackageVersion>0.8.2</EasyCachingRedisPackageVersion>
<EasyCachingSQLitePackageVersion>0.8.0</EasyCachingSQLitePackageVersion>
<EasyCachingInMemoryPackageVersion>0.8.0</EasyCachingInMemoryPackageVersion>
<EasyCachingHybridPackageVersion>0.8.1</EasyCachingHybridPackageVersion>
<EasyCachingAspectCorePackageVersion>0.8.0</EasyCachingAspectCorePackageVersion>
<EasyCachingCastlePackageVersion>0.8.0</EasyCachingCastlePackageVersion>
<EasyCachingResponseCachingPackageVersion>0.8.0</EasyCachingResponseCachingPackageVersion>
<EasyCachingJsonPackageVersion>0.8.1</EasyCachingJsonPackageVersion>
<EasyCachingMessagePackPackageVersion>0.8.1</EasyCachingMessagePackPackageVersion>
<EasyCachingProtobufPackageVersion>0.8.0</EasyCachingProtobufPackageVersion>
<EasyCachingCSRedisPackageVersion>0.8.2</EasyCachingCSRedisPackageVersion>
<EasyCachingRedisBusPackageVersion>0.8.0</EasyCachingRedisBusPackageVersion>
<EasyCachingCSRedisBusPackageVersion>0.8.1</EasyCachingCSRedisBusPackageVersion>
<EasyCachingRabbitBusPackageVersion>0.8.0</EasyCachingRabbitBusPackageVersion>
<EasyCachingDiskPackageVersion>0.8.0</EasyCachingDiskPackageVersion>
<EasyCachingCorePackageVersion>0.8.3</EasyCachingCorePackageVersion>
<EasyCachingMemcachedPackageVersion>0.8.3</EasyCachingMemcachedPackageVersion>
<EasyCachingRedisPackageVersion>0.8.3</EasyCachingRedisPackageVersion>
<EasyCachingSQLitePackageVersion>0.8.3</EasyCachingSQLitePackageVersion>
<EasyCachingInMemoryPackageVersion>0.8.3</EasyCachingInMemoryPackageVersion>
<EasyCachingHybridPackageVersion>0.8.3</EasyCachingHybridPackageVersion>
<EasyCachingAspectCorePackageVersion>0.8.3</EasyCachingAspectCorePackageVersion>
<EasyCachingCastlePackageVersion>0.8.3</EasyCachingCastlePackageVersion>
<EasyCachingResponseCachingPackageVersion>0.8.3</EasyCachingResponseCachingPackageVersion>
<EasyCachingJsonPackageVersion>0.8.3</EasyCachingJsonPackageVersion>
<EasyCachingMessagePackPackageVersion>0.8.3</EasyCachingMessagePackPackageVersion>
<EasyCachingProtobufPackageVersion>0.8.3</EasyCachingProtobufPackageVersion>
<EasyCachingCSRedisPackageVersion>0.8.3</EasyCachingCSRedisPackageVersion>
<EasyCachingRedisBusPackageVersion>0.8.3</EasyCachingRedisBusPackageVersion>
<EasyCachingCSRedisBusPackageVersion>0.8.3</EasyCachingCSRedisBusPackageVersion>
<EasyCachingRabbitBusPackageVersion>0.8.3</EasyCachingRabbitBusPackageVersion>
<EasyCachingDiskPackageVersion>0.8.3</EasyCachingDiskPackageVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/EasyCaching.Bus.CSRedis/EasyCaching.Bus.CSRedis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSRedisCore" Version="3.1.8" />
<PackageReference Include="CSRedisCore" Version="3.1.17" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EasyCaching.Core\EasyCaching.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="RabbitMQ.Client" Version="5.1.1" />
<PackageReference Include="RabbitMQ.Client" Version="5.1.2" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="3.0.0" />
</ItemGroup>
</Project>
146 changes: 146 additions & 0 deletions src/EasyCaching.CSRedis/DefaultCSRedisCachingProvider.Geo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
namespace EasyCaching.CSRedis
{
using EasyCaching.Core;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using GeoUnit = global::CSRedis.GeoUnit;

public partial class DefaultCSRedisCachingProvider : IRedisCachingProvider
{
public long GeoAdd(string cacheKey, List<(double longitude, double latitude, string member)> values)
{
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
ArgumentCheck.NotNullAndCountGTZero(values, nameof(values));

var list = new List<(double longitude, double latitude, object member)>();

foreach (var item in values)
{
list.Add((item.longitude, item.latitude, item.member));
}

var res = _cache.GeoAdd(cacheKey, list.ToArray());
return res;
}

public async Task<long> GeoAddAsync(string cacheKey, List<(double longitude, double latitude, string member)> values)
{
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
ArgumentCheck.NotNullAndCountGTZero(values, nameof(values));

var list = new List<(double longitude, double latitude, object member)>();

foreach (var item in values)
{
list.Add((item.longitude, item.latitude, item.member));
}

var res = await _cache.GeoAddAsync(cacheKey, list.ToArray());
return res;
}

public double? GeoDist(string cacheKey, string member1, string member2, string unit = "m")
{
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
ArgumentCheck.NotNullOrWhiteSpace(member1, nameof(member1));
ArgumentCheck.NotNullOrWhiteSpace(member2, nameof(member2));
ArgumentCheck.NotNullOrWhiteSpace(unit, nameof(unit));

var res = _cache.GeoDist(cacheKey, member1, member2, GetGeoUnit(unit));
return res;
}

public async Task<double?> GeoDistAsync(string cacheKey, string member1, string member2, string unit = "m")
{
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
ArgumentCheck.NotNullOrWhiteSpace(member1, nameof(member1));
ArgumentCheck.NotNullOrWhiteSpace(member2, nameof(member2));
ArgumentCheck.NotNullOrWhiteSpace(unit, nameof(unit));

var res = await _cache.GeoDistAsync(cacheKey, member1, member2, GetGeoUnit(unit));
return res;
}

public List<string> GeoHash(string cacheKey, List<string> members)
{
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
ArgumentCheck.NotNullAndCountGTZero(members, nameof(members));

var list = new List<object>();
foreach (var item in members)
{
list.Add(item);
}

var res = _cache.GeoHash(cacheKey, list.ToArray());
return res.ToList() ;
}

public async Task<List<string>> GeoHashAsync(string cacheKey, List<string> members)
{
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
ArgumentCheck.NotNullAndCountGTZero(members, nameof(members));

var list = new List<object>();
foreach (var item in members)
{
list.Add(item);
}

var res = await _cache.GeoHashAsync(cacheKey, list.ToArray());
return res.ToList();
}

public List<(double longitude, double latitude)?> GeoPos(string cacheKey, List<string> members)
{
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
ArgumentCheck.NotNullAndCountGTZero(members, nameof(members));

var list = new List<object>();
foreach (var item in members)
{
list.Add(item);
}

var res = _cache.GeoPos(cacheKey, list.ToArray());
return res.ToList();
}

public async Task<List<(double longitude, double latitude)?>> GeoPosAsync(string cacheKey, List<string> members)
{
ArgumentCheck.NotNullOrWhiteSpace(cacheKey, nameof(cacheKey));
ArgumentCheck.NotNullAndCountGTZero(members, nameof(members));

var list = new List<object>();
foreach (var item in members)
{
list.Add(item);
}

var res = await _cache.GeoPosAsync(cacheKey, list.ToArray());
return res.ToList();
}

private GeoUnit GetGeoUnit(string unit)
{
GeoUnit geoUnit;
switch (unit)
{
case "km":
geoUnit = GeoUnit.km;
break;
case "ft":
geoUnit = GeoUnit.ft;
break;
case "mi":
geoUnit = GeoUnit.mi;
break;
default:
geoUnit = GeoUnit.m;
break;
}
return geoUnit;
}
}
}
2 changes: 1 addition & 1 deletion src/EasyCaching.CSRedis/EasyCaching.CSRedis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CSRedisCore" Version="3.1.8" />
<PackageReference Include="CSRedisCore" Version="3.1.17" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EasyCaching.Core\EasyCaching.Core.csproj" />
Expand Down
Loading

0 comments on commit 82dd4e1

Please sign in to comment.