diff --git a/AspNetCore.DataProtection/DataProtection/NCache.OSS.AspNetCore.DataProtection.csproj b/AspNetCore.DataProtection/DataProtection/NCache.OSS.AspNetCore.DataProtection.csproj index 3974953..275dd22 100644 --- a/AspNetCore.DataProtection/DataProtection/NCache.OSS.AspNetCore.DataProtection.csproj +++ b/AspNetCore.DataProtection/DataProtection/NCache.OSS.AspNetCore.DataProtection.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + net6.0 Copyright 2005-2026 Alachisoft. All rights reserved. Alachisoft Alachisoft @@ -11,8 +11,8 @@ - - + + @@ -26,9 +26,6 @@ Always - - Always - diff --git a/AspNetCore.DataProtection/DataProtection/TaggingExtensionOSS.cs b/AspNetCore.DataProtection/DataProtection/TaggingExtensionOSS.cs index 1c24b12..d509653 100644 --- a/AspNetCore.DataProtection/DataProtection/TaggingExtensionOSS.cs +++ b/AspNetCore.DataProtection/DataProtection/TaggingExtensionOSS.cs @@ -79,33 +79,32 @@ public static Dictionary GetUsingTag(this ICache cache, string tag public static void RemoveUsingTag(this ICache cache, string tag) { - LockHandle lockHandle = null; - while (true) { - try - { - var keys = cache.Get>(tag); + //lockKey refuses a key that does not exist + if (!cache.Contains(tag)) + return; + // the lock expires on its own + bool locked = cache.LockKey(tag, out var lockToken, TimeSpan.FromSeconds(19)); - if (keys == null) - return; - - - keys = cache.Get>(tag, true, TimeSpan.FromSeconds(10), ref lockHandle); - - if (keys == null && lockHandle == null) - continue; + if (!locked) + { + continue; + } - cache.RemoveBulk(keys, out var removedKeys); + try + { + var keys = cache.Get>(tag); - // Remove tag itself + if (keys != null && keys.Count > 0) + cache.RemoveBulk(keys, out var removedKeys); cache.Remove(tag); } finally { - if (lockHandle != null) - cache.Unlock(tag, lockHandle); + cache.UnlockKey(tag, lockToken); + } break; } diff --git a/AspNetCore.DataProtection/Sample/NCacheDataProtectionSample.csproj b/AspNetCore.DataProtection/Sample/NCacheDataProtectionSample.csproj index fa8a7ce..d9d3b90 100644 --- a/AspNetCore.DataProtection/Sample/NCacheDataProtectionSample.csproj +++ b/AspNetCore.DataProtection/Sample/NCacheDataProtectionSample.csproj @@ -1,15 +1,16 @@ - net8.0 + net6.0 enable enable NCacheDataProtectionSample true + - + diff --git a/AspNetCore.DataProtection/Sample/Program.cs b/AspNetCore.DataProtection/Sample/Program.cs index 34a5096..ad32a9e 100644 --- a/AspNetCore.DataProtection/Sample/Program.cs +++ b/AspNetCore.DataProtection/Sample/Program.cs @@ -4,7 +4,7 @@ var builder = WebApplication.CreateBuilder(args); // Read NCache settings from appsettings.json -var cacheName = builder.Configuration["NCacheSettings:CacheName"] ?? "demoCache"; +var cacheName = builder.Configuration["NCacheSettings:CacheName"] ?? "defaultCache"; var appId = builder.Configuration["NCacheSettings:ApplicationId"] ?? "NCacheDataProtectionSample"; var keyName = builder.Configuration["NCacheSettings:KeyName"] ?? "DataProtection-Keys"; diff --git a/AspNetCore.DataProtection/Sample/client.ncconf b/AspNetCore.DataProtection/Sample/client.ncconf index 4956013..3f2e1a7 100644 --- a/AspNetCore.DataProtection/Sample/client.ncconf +++ b/AspNetCore.DataProtection/Sample/client.ncconf @@ -1,7 +1,7 @@ - - + + diff --git a/AspNetCore.OutputCacheProvider/NCacheOutputCacheProvider/NCacheOutputCacheProvider.csproj b/AspNetCore.OutputCacheProvider/NCacheOutputCacheProvider/NCacheOutputCacheProvider.csproj index 70395e4..eab4bcf 100644 --- a/AspNetCore.OutputCacheProvider/NCacheOutputCacheProvider/NCacheOutputCacheProvider.csproj +++ b/AspNetCore.OutputCacheProvider/NCacheOutputCacheProvider/NCacheOutputCacheProvider.csproj @@ -15,16 +15,14 @@ - + Always - - Always - + diff --git a/AspNetCore.OutputCacheProvider/OutputCacheTestApp/Program.cs b/AspNetCore.OutputCacheProvider/OutputCacheTestApp/Program.cs index c9b7947..c9724ed 100644 --- a/AspNetCore.OutputCacheProvider/OutputCacheTestApp/Program.cs +++ b/AspNetCore.OutputCacheProvider/OutputCacheTestApp/Program.cs @@ -12,7 +12,7 @@ builder.Services.AddNCacheOutputCacheProvider(options => { - options.CacheName = "demoCache"; + options.CacheName = "defaultCache"; options.ServerList = new List { diff --git a/AspNetCore.OutputCacheProvider/OutputCacheTestApp/appsettings.json b/AspNetCore.OutputCacheProvider/OutputCacheTestApp/appsettings.json index 7be1be8..a49edc4 100644 --- a/AspNetCore.OutputCacheProvider/OutputCacheTestApp/appsettings.json +++ b/AspNetCore.OutputCacheProvider/OutputCacheTestApp/appsettings.json @@ -1,11 +1,11 @@ { "NCacheOutputCache": { - "CacheName": "demoCache", + "CacheName": "defaultCache", "EnabledLogs": true, "EnableDetailLogs": true, "ServerList": [ { - "Ip": "127.0.0.1", + "Ip": "20.200.20.44", "Port": 9800 } ] diff --git a/AspNetCore.SignalR/AspNetCore.SignalR/AspNetCore.SignalR.csproj b/AspNetCore.SignalR/AspNetCore.SignalR/AspNetCore.SignalR.csproj index e68b012..e3d6ef8 100644 --- a/AspNetCore.SignalR/AspNetCore.SignalR/AspNetCore.SignalR.csproj +++ b/AspNetCore.SignalR/AspNetCore.SignalR/AspNetCore.SignalR.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + net6.0 true 5.3.6.1 latest @@ -26,8 +26,8 @@ - - + + Alachisoft.NCache.AspNetCore.SignalR diff --git a/Extensions/Alachisoft.NCache.Client.Extension/Alachisoft.NCache.Client.Extension.csproj b/Extensions/Alachisoft.NCache.Client.Extension/Alachisoft.NCache.Client.Extension.csproj index e8f23bc..a6bbe3e 100644 --- a/Extensions/Alachisoft.NCache.Client.Extension/Alachisoft.NCache.Client.Extension.csproj +++ b/Extensions/Alachisoft.NCache.Client.Extension/Alachisoft.NCache.Client.Extension.csproj @@ -11,7 +11,7 @@ - + diff --git a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheDistributedCache.Net.csproj b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheDistributedCache.Net.csproj index ad8e61a..1610e10 100644 --- a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheDistributedCache.Net.csproj +++ b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheDistributedCache.Net.csproj @@ -30,15 +30,12 @@ - - - - + - - - - + + + + diff --git a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheDistributedCache.csproj b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheDistributedCache.csproj index 9bfb256..37120a7 100644 --- a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheDistributedCache.csproj +++ b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheDistributedCache.csproj @@ -34,162 +34,97 @@ - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Cache.dll - True - - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Client.dll - True - - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Cluster.dll - True - - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Common.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Cache.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Instrumentation.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Client.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Management.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Cluster.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Runtime.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Common.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.RuntimeDependencies.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Instrumentation.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Serialization.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Management.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.SocketServer.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Runtime.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\Alachisoft.NCache.Storage.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.RuntimeDependencies.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\log4net.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Serialization.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\log4net.ext.dll - True + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.SocketServer.dll - - ..\packages\Microsoft.AspNetCore.Cryptography.Internal.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Cryptography.Internal.dll + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\Alachisoft.NCache.Storage.dll - - ..\packages\Microsoft.AspNetCore.DataProtection.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.DataProtection.dll + + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\log4net.ext.dll - - ..\packages\Microsoft.AspNetCore.DataProtection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.DataProtection.Abstractions.dll + + ..\packages\Microsoft.Extensions.Caching.Abstractions.2.1.0\lib\netstandard2.0\Microsoft.Extensions.Caching.Abstractions.dll - - ..\packages\Microsoft.AspNetCore.Hosting.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll + + ..\packages\Microsoft.Extensions.Configuration.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll - - ..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll + + ..\packages\Microsoft.Extensions.Configuration.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll - - ..\packages\Microsoft.AspNetCore.Http.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll + + ..\packages\Microsoft.Extensions.Configuration.Binder.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll - - ..\packages\Microsoft.AspNetCore.Http.Features.2.0.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll + + ..\packages\Microsoft.Extensions.Configuration.FileExtensions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll - - ..\packages\Microsoft.Extensions.Caching.Abstractions.10.0.9\lib\net462\Microsoft.Extensions.Caching.Abstractions.dll + + ..\packages\Microsoft.Extensions.Configuration.Json.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Configuration.Json.dll - - ..\packages\Microsoft.Extensions.Configuration.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll + + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - ..\packages\Microsoft.Extensions.Configuration.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll + + ..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll - - ..\packages\Microsoft.Extensions.Configuration.Binder.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll + + ..\packages\Microsoft.Extensions.FileProviders.Physical.2.1.1\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + ..\packages\Microsoft.Extensions.FileSystemGlobbing.2.1.1\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll - - ..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll + + ..\packages\Microsoft.Extensions.Options.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.dll - - ..\packages\Microsoft.Extensions.Hosting.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll + + ..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - - ..\packages\Microsoft.Extensions.Logging.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll + + ..\packages\Microsoft.Extensions.Primitives.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll - - ..\packages\Microsoft.Extensions.Options.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll - - - ..\packages\Microsoft.Extensions.Options.ConfigurationExtensions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - - - ..\packages\Microsoft.Extensions.Primitives.10.0.9\lib\net462\Microsoft.Extensions.Primitives.dll - - - ..\packages\Microsoft.Win32.Registry.4.4.0\lib\net461\Microsoft.Win32.Registry.dll - - - ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll True - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\protobuf-net-ext.dll + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\protobuf-net-ext.dll True - - ..\packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll - - ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.6.2\lib\net40\System.Management.Automation.dll + ..\packages\Alachisoft.NCache.Opensource.SDK.5.3.603\lib\net462\System.Management.Automation.dll True - - ..\packages\System.Memory.4.6.3\lib\net462\System.Memory.dll - - - ..\packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - - - ..\packages\System.Security.AccessControl.4.4.0\lib\net461\System.Security.AccessControl.dll - - - ..\packages\System.Security.Cryptography.Xml.4.4.0\lib\net461\System.Security.Cryptography.Xml.dll - - - ..\packages\System.Security.Principal.Windows.4.4.0\lib\net461\System.Security.Principal.Windows.dll - - - ..\packages\System.Text.Encodings.Web.4.4.0\lib\netstandard2.0\System.Text.Encodings.Web.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll - @@ -200,6 +135,12 @@ + + Always + + + Always + diff --git a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheSessionExtensions.cs b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheSessionExtensions.cs index c14a110..3b4941e 100644 --- a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheSessionExtensions.cs +++ b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/NCacheSessionExtensions.cs @@ -1,7 +1,6 @@ using System; using Alachisoft.NCache.Caching.Distributed.Configuration; using Alachisoft.NCache.Serialization.Formatters; -using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Caching.Distributed; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -29,7 +28,7 @@ public static IServiceCollection AddNCacheDistributedCache(this IServiceCollecti throw new ArgumentNullException(nameof(configure)); } - services.Configure(configure); + services.AddOptions().Configure(configure); return services.AddSingleton(); } diff --git a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/app.config b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/app.config index 967ca6e..3124c96 100644 --- a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/app.config +++ b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/app.config @@ -8,7 +8,7 @@ - + @@ -42,6 +42,10 @@ + + + + diff --git a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/packages.config b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/packages.config index 42f0ecc..57f5b7b 100644 --- a/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/packages.config +++ b/Microsoft.Extensions.Caching.Distributed/NCacheDistributedCache/packages.config @@ -1,33 +1,18 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NCache.OSS.HangFire/HangFire/HangFire.csproj b/NCache.OSS.HangFire/HangFire/HangFire.csproj index 68931a4..f59de88 100644 --- a/NCache.OSS.HangFire/HangFire/HangFire.csproj +++ b/NCache.OSS.HangFire/HangFire/HangFire.csproj @@ -6,11 +6,11 @@ NCache.OSS.Hangfire NCache.OSS.Hangfire NCache OSS storage provider for Hangfire. - 5.3.6.2 + 5.3.603 - + diff --git a/NHibernate/NHibernateNCache.Net.csproj b/NHibernate/NHibernateNCache.Net.csproj index c3193bb..bb805dd 100644 --- a/NHibernate/NHibernateNCache.Net.csproj +++ b/NHibernate/NHibernateNCache.Net.csproj @@ -62,9 +62,9 @@ - - - + + +