Skip to content

Commit

Permalink
Merge pull request #503 from dotnetcore/dev
Browse files Browse the repository at this point in the history
v1.9.2 release
  • Loading branch information
Memoyu authored Oct 31, 2023
2 parents dc5d920 + 36516bd commit 4122f1a
Show file tree
Hide file tree
Showing 26 changed files with 740 additions and 96 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
os: [ windows-latest ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET SDK 6.0.x
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
- 11212:11211

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET SDK 6.0.x
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Build with dotnet
run: dotnet build --configuration Release /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln
- name: Pack with dotnet
run: dotnet pack /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln --version-suffix alpha`date +%Y%m%d%H%M%S` -o /home/runner/work/nugetpkgs -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: nugetpkgs
path: /home/runner/work/nugetpkgs
Expand All @@ -35,9 +35,10 @@ jobs:

steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: nugetpkgs
path: nugetpkgs
- name: list nugetpkgs
run: ls nugetpkgs
- name: Release
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Build with dotnet
run: dotnet build --configuration Release /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln
- name: Pack with dotnet
run: dotnet pack /home/runner/work/EasyCaching/EasyCaching/EasyCaching.sln -o /home/runner/work/nugetpkgs -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: nugetpkgs
path: /home/runner/work/nugetpkgs
Expand All @@ -33,9 +33,10 @@ jobs:

steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: nugetpkgs
path: nugetpkgs
- name: list nugetpkgs
run: ls nugetpkgs
- name: Release
Expand Down
21 changes: 18 additions & 3 deletions EasyCaching.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 12.00

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32616.157
MinimumVisualStudioVersion = 10.0.40219.1
Expand Down Expand Up @@ -72,12 +73,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyCaching.Serialization.S
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyCaching.Bus.ConfluentKafka", "bus\EasyCaching.Bus.ConfluentKafka\EasyCaching.Bus.ConfluentKafka.csproj", "{F7FBADEB-D766-4595-949A-07104B52692C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Bus.Zookeeper", "bus\EasyCaching.Bus.Zookeeper\EasyCaching.Bus.Zookeeper.csproj", "{5E488583-391E-4E15-83C1-7301B4FE79AE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyCaching.Bus.Zookeeper", "bus\EasyCaching.Bus.Zookeeper\EasyCaching.Bus.Zookeeper.csproj", "{5E488583-391E-4E15-83C1-7301B4FE79AE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.FasterKv", "src\EasyCaching.FasterKv\EasyCaching.FasterKv.csproj", "{7191E567-38DF-4879-82E1-73EC618AFCAC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyCaching.FasterKv", "src\EasyCaching.FasterKv\EasyCaching.FasterKv.csproj", "{7191E567-38DF-4879-82E1-73EC618AFCAC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Bus.RabbitMQStream", "bus\EasyCaching.Bus.RabbitMQStream\EasyCaching.Bus.RabbitMQStream.csproj", "{3C9D5E40-B3A5-4649-8B40-08094644B0FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Serialization.MemoryPack", "serialization\EasyCaching.Serialization.MemoryPack\EasyCaching.Serialization.MemoryPack.csproj", "{EEF22C21-F380-4980-B72C-F14488369333}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyCaching.Demo.Locks", "sample\EasyCaching.Demo.Locks\EasyCaching.Demo.Locks.csproj", "{9B15A0A0-BD6B-40B0-90D4-848BC3E4AF98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -208,6 +213,14 @@ Global
{EEF22C21-F380-4980-B72C-F14488369333}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEF22C21-F380-4980-B72C-F14488369333}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEF22C21-F380-4980-B72C-F14488369333}.Release|Any CPU.Build.0 = Release|Any CPU
{3C9D5E40-B3A5-4649-8B40-08094644B0FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C9D5E40-B3A5-4649-8B40-08094644B0FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C9D5E40-B3A5-4649-8B40-08094644B0FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C9D5E40-B3A5-4649-8B40-08094644B0FB}.Release|Any CPU.Build.0 = Release|Any CPU
{9B15A0A0-BD6B-40B0-90D4-848BC3E4AF98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9B15A0A0-BD6B-40B0-90D4-848BC3E4AF98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9B15A0A0-BD6B-40B0-90D4-848BC3E4AF98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9B15A0A0-BD6B-40B0-90D4-848BC3E4AF98}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -244,6 +257,8 @@ Global
{5E488583-391E-4E15-83C1-7301B4FE79AE} = {B337509B-75F9-4851-821F-9BBE87C4E4BC}
{7191E567-38DF-4879-82E1-73EC618AFCAC} = {A0F5CC7E-155F-4726-8DEB-E966950B3FE9}
{EEF22C21-F380-4980-B72C-F14488369333} = {15070C49-A507-4844-BCFE-D319CFBC9A63}
{3C9D5E40-B3A5-4649-8B40-08094644B0FB} = {B337509B-75F9-4851-821F-9BBE87C4E4BC}
{9B15A0A0-BD6B-40B0-90D4-848BC3E4AF98} = {F88D727A-9F9C-43D9-90B1-D4A02BF8BC98}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {63A57886-054B-476C-AAE1-8D7C8917682E}
Expand Down
5 changes: 5 additions & 0 deletions build/releasenotes.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
</EasyCachingSQLitePackageNotes>
<EasyCachingInMemoryPackageNotes>
1. Upgrading dependencies.
2. Fix no check expires when get cache count
</EasyCachingInMemoryPackageNotes>
<EasyCachingHybridPackageNotes>
1. Upgrading dependencies.
Expand Down Expand Up @@ -59,6 +60,7 @@
</EasyCachingDiskPackageNotes>
<EasyCachingLiteDBPackageNotes>
1. Upgrading dependencies.
2. Always use utc to compare the expiry
</EasyCachingLiteDBPackageNotes>
<EasyCachingSTJsonPackageNotes>
1. Upgrading dependencies.
Expand All @@ -69,5 +71,8 @@
<EasyCachingFaskKVPackageNotes>
1. Upgrading dependencies.
</EasyCachingFaskKVPackageNotes>
<EasyCachingRabbitStreamBusPackageNotes>
1. Initial release.
</EasyCachingRabbitStreamBusPackageNotes>
</PropertyGroup>
</Project>
49 changes: 25 additions & 24 deletions build/version.props
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
<Project>
<PropertyGroup>
<EasyCachingCorePackageVersion>1.9.1</EasyCachingCorePackageVersion>
<EasyCachingMemcachedPackageVersion>1.9.1</EasyCachingMemcachedPackageVersion>
<EasyCachingRedisPackageVersion>1.9.1</EasyCachingRedisPackageVersion>
<EasyCachingSQLitePackageVersion>1.9.1</EasyCachingSQLitePackageVersion>
<EasyCachingInMemoryPackageVersion>1.9.1</EasyCachingInMemoryPackageVersion>
<EasyCachingHybridPackageVersion>1.9.1</EasyCachingHybridPackageVersion>
<EasyCachingAspectCorePackageVersion>1.9.1</EasyCachingAspectCorePackageVersion>
<EasyCachingCastlePackageVersion>1.9.1</EasyCachingCastlePackageVersion>
<EasyCachingResponseCachingPackageVersion>1.9.1</EasyCachingResponseCachingPackageVersion>
<EasyCachingJsonPackageVersion>1.9.1</EasyCachingJsonPackageVersion>
<EasyCachingMessagePackPackageVersion>1.9.1</EasyCachingMessagePackPackageVersion>
<EasyCachingProtobufPackageVersion>1.9.1</EasyCachingProtobufPackageVersion>
<EasyCachingCSRedisPackageVersion>1.9.1</EasyCachingCSRedisPackageVersion>
<EasyCachingRedisBusPackageVersion>1.9.1</EasyCachingRedisBusPackageVersion>
<EasyCachingCSRedisBusPackageVersion>1.9.1</EasyCachingCSRedisBusPackageVersion>
<EasyCachingRabbitBusPackageVersion>1.9.1</EasyCachingRabbitBusPackageVersion>
<EasyCachingKafkaBusPackageVersion>1.9.1</EasyCachingKafkaBusPackageVersion>
<EasyCachingZookeeperBusPackageVersion>1.9.1</EasyCachingZookeeperBusPackageVersion>
<EasyCachingDiskPackageVersion>1.9.1</EasyCachingDiskPackageVersion>
<EasyCachingMsExtPackageVersion>1.9.1</EasyCachingMsExtPackageVersion>
<EasyCachingLiteDBPackageVersion>1.9.1</EasyCachingLiteDBPackageVersion>
<EasyCachingSTJsonPackageVersion>1.9.1</EasyCachingSTJsonPackageVersion>
<EasyCachingMemoryPackageVersion>1.9.1</EasyCachingMemoryPackageVersion>
<EasyCachingFaskKVPackageVersion>1.9.1</EasyCachingFaskKVPackageVersion>
<EasyCachingCorePackageVersion>1.9.2</EasyCachingCorePackageVersion>
<EasyCachingMemcachedPackageVersion>1.9.2</EasyCachingMemcachedPackageVersion>
<EasyCachingRedisPackageVersion>1.9.2</EasyCachingRedisPackageVersion>
<EasyCachingSQLitePackageVersion>1.9.2</EasyCachingSQLitePackageVersion>
<EasyCachingInMemoryPackageVersion>1.9.2</EasyCachingInMemoryPackageVersion>
<EasyCachingHybridPackageVersion>1.9.2</EasyCachingHybridPackageVersion>
<EasyCachingAspectCorePackageVersion>1.9.2</EasyCachingAspectCorePackageVersion>
<EasyCachingCastlePackageVersion>1.9.2</EasyCachingCastlePackageVersion>
<EasyCachingResponseCachingPackageVersion>1.9.2</EasyCachingResponseCachingPackageVersion>
<EasyCachingJsonPackageVersion>1.9.2</EasyCachingJsonPackageVersion>
<EasyCachingMessagePackPackageVersion>1.9.2</EasyCachingMessagePackPackageVersion>
<EasyCachingProtobufPackageVersion>1.9.2</EasyCachingProtobufPackageVersion>
<EasyCachingCSRedisPackageVersion>1.9.2</EasyCachingCSRedisPackageVersion>
<EasyCachingRedisBusPackageVersion>1.9.2</EasyCachingRedisBusPackageVersion>
<EasyCachingCSRedisBusPackageVersion>1.9.2</EasyCachingCSRedisBusPackageVersion>
<EasyCachingRabbitBusPackageVersion>1.9.2</EasyCachingRabbitBusPackageVersion>
<EasyCachingRabbitStreamBusPackageVersion>1.9.2</EasyCachingRabbitStreamBusPackageVersion>
<EasyCachingKafkaBusPackageVersion>1.9.2</EasyCachingKafkaBusPackageVersion>
<EasyCachingZookeeperBusPackageVersion>1.9.2</EasyCachingZookeeperBusPackageVersion>
<EasyCachingDiskPackageVersion>1.9.2</EasyCachingDiskPackageVersion>
<EasyCachingMsExtPackageVersion>1.9.2</EasyCachingMsExtPackageVersion>
<EasyCachingLiteDBPackageVersion>1.9.2</EasyCachingLiteDBPackageVersion>
<EasyCachingSTJsonPackageVersion>1.9.2</EasyCachingSTJsonPackageVersion>
<EasyCachingMemoryPackageVersion>1.9.2</EasyCachingMemoryPackageVersion>
<EasyCachingFaskKVPackageVersion>1.9.2</EasyCachingFaskKVPackageVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// RabbitMQ Bus options.
/// </summary>
public class RabbitMQBusOptions : BaseRabbitMQOptions
{
{
/// <summary>
/// Gets or sets the name of the queue.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
namespace Microsoft.Extensions.DependencyInjection
{
using System;
using EasyCaching.Bus.RabbitMQ;
using EasyCaching.Bus.RabbitMQStream;
using EasyCaching.Core;
using EasyCaching.Core.Configurations;
using Microsoft.Extensions.Configuration;

/// <summary>
/// EasyCaching options extensions.
/// </summary>
public static class EasyCachingOptionsExtensions
{
/// <summary>
/// Withs the RabbitMQStream bus (specify the config via hard code).
/// </summary>
/// <param name="options">Options.</param>
/// <param name="configure">Configure bus settings.</param>

public static EasyCachingOptions WithRabbitMQStreamBus(
this EasyCachingOptions options
, Action<RabbitMQBusOptions> configure
)
{
ArgumentCheck.NotNull(configure, nameof(configure));

options.RegisterExtension(new RabbitMQStreamBusOptionsExtension(configure));
return options;
}

/// <summary>
/// Withs the RabbitMQStream bus (read config from configuration file).
/// </summary>
/// <param name="options">Options.</param>
/// <param name="configuration">The configuration.</param>
/// <param name="sectionName">The section name in the configuration file.</param>
public static EasyCachingOptions WithRabbitMQStreamBus(
this EasyCachingOptions options
, IConfiguration configuration
, string sectionName = EasyCachingConstValue.RabbitMQBusSection
)
{
var dbConfig = configuration.GetSection(sectionName);
var busOptions = new RabbitMQBusOptions();
dbConfig.Bind(busOptions);

void configure(RabbitMQBusOptions x)
{
x.HostName = busOptions.HostName;
x.Password = busOptions.Password;
x.Port = busOptions.Port;
x.QueueMessageExpires = busOptions.QueueMessageExpires;
x.RequestedConnectionTimeout = busOptions.RequestedConnectionTimeout;
//x.RouteKey = busOptions.RouteKey;
x.SocketReadTimeout = busOptions.SocketReadTimeout;
x.SocketWriteTimeout = busOptions.SocketWriteTimeout;
x.TopicExchangeName = busOptions.TopicExchangeName;
x.UserName = busOptions.UserName;
x.VirtualHost = busOptions.VirtualHost;
x.QueueName = busOptions.QueueName;
}

options.RegisterExtension(new RabbitMQStreamBusOptionsExtension(configure));
return options;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
namespace EasyCaching.Bus.RabbitMQStream
{
using System;
using EasyCaching.Bus.RabbitMQ;
using EasyCaching.Core.Bus;
using EasyCaching.Core.Configurations;
using global::RabbitMQ.Client;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.ObjectPool;

/// <summary>
/// RabbitMQ Bus options extension.
/// </summary>
public class RabbitMQStreamBusOptionsExtension : IEasyCachingOptionsExtension
{
/// <summary>
/// The configure.
/// </summary>
private readonly Action<RabbitMQBusOptions> configure;

/// <summary>
/// Initializes a new instance of the <see cref="T:EasyCaching.Bus.RabbitMQ.RabbitMQBusOptionsExtension"/> class.
/// </summary>
/// <param name="configure">Configure.</param>
public RabbitMQStreamBusOptionsExtension(Action<RabbitMQBusOptions> configure)
{
this.configure = configure;
}

/// <summary>
/// Adds the services.
/// </summary>
/// <param name="services">Services.</param>
public void AddServices(IServiceCollection services)
{
services.AddOptions();
services.Configure(configure);

services.AddSingleton<IPooledObjectPolicy<IModel>, ModelPooledObjectPolicy>();
services.AddSingleton<IEasyCachingBus, DefaultRabbitMQStreamBus>();
}
}
}
Loading

0 comments on commit 4122f1a

Please sign in to comment.