Skip to content

Commit

Permalink
v2.0.0-preview-3
Browse files Browse the repository at this point in the history
  • Loading branch information
jodydonetti committed Dec 9, 2024
1 parent a429ea8 commit 70514c3
Show file tree
Hide file tree
Showing 21 changed files with 44 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void Setup()

// SETUP CACHES
_FusionCache = new FusionCache(new FusionCacheOptions { DefaultEntryOptions = new FusionCacheEntryOptions(CacheDuration) });
_FusionCacheNoTagging = new FusionCache(new FusionCacheOptions { DefaultEntryOptions = new FusionCacheEntryOptions(CacheDuration), DisabledTagging = true });
_FusionCacheNoTagging = new FusionCache(new FusionCacheOptions { DefaultEntryOptions = new FusionCacheEntryOptions(CacheDuration), DisableTagging = true });
_FusionCacheProbabilistic = new FusionCache(new FusionCacheOptions { DefaultEntryOptions = new FusionCacheEntryOptions(CacheDuration) }, memoryLocker: new ProbabilisticMemoryLocker());
_CacheTower = new CacheStack(null, new CacheStackOptions([new MemoryCacheLayer()]) { Extensions = [new AutoCleanupExtension(TimeSpan.FromMinutes(5))] });
_EasyCaching = ServiceProvider.GetRequiredService<IEasyCachingProviderFactory>().GetCachingProvider("default");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Backplane.Memory</PackageId>
<Description>FusionCache in memory backplane, used for testing</Description>
<PackageTags>backplane;memory;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Backplane.StackExchangeRedis</PackageId>
<Description>FusionCache backplane for Redis based on the StackExchange.Redis library</Description>
<PackageTags>backplane;redis;stackexchange;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy</PackageTags>
Expand All @@ -24,7 +24,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="StackExchange.Redis" Version="2.8.16" />
<PackageReference Include="StackExchange.Redis" Version="2.8.22" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Chaos</PackageId>
<Description>Chaos-related utilities and implementations of various componenets (like a distributed cache or a backplane), useful for things like testing dependent components' behavior in a controlled failing environment.</Description>
<PackageTags>chaos;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.OpenTelemetry</PackageId>
<Description>Add native OpenTelemetry support to FusionCache.</Description>
<PackageTags>telemetry;observability;opentelemetry;open-telemetry;chaos;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.1;net7.0</TargetFrameworks>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Serialization.CysharpMemoryPack</PackageId>
<Description>FusionCache serializer based on Cysharp's MemoryPack serializer</Description>
<PackageTags>memorypack;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy;cache-stampede</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Serialization.NeueccMessagePack</PackageId>
<Description>FusionCache serializer based on Neuecc's MessagePack serializer</Description>
<PackageTags>messagepack;msgpack;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy;cache-stampede</PackageTags>
Expand All @@ -25,7 +25,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MessagePack" Version="2.5.187" />
<PackageReference Include="MessagePack" Version="3.0.308" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Serialization.NewtonsoftJson</PackageId>
<Description>FusionCache serializer based on Newtonsoft Json.NET</Description>
<PackageTags>json;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy;cache-stampede</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Serialization.ProtoBufNet</PackageId>
<Description>FusionCache serializer based on protobuf-net</Description>
<PackageTags>protobuf;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Serialization.ServiceStackJson</PackageId>
<Description>FusionCache serializer based on ServiceStack's Json serializer</Description>
<PackageTags>json;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy;cache-stampede</PackageTags>
<RootNamespace>ZiggyCreatures.Caching.Fusion.Serialization.ServiceStackJson</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReleaseNotes>
- Add: Tagging support (preview)
- Update: package dependencies
</PackageReleaseNotes>
<PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion>
Expand All @@ -24,7 +25,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ServiceStack.Text" Version="8.4.0" />
<PackageReference Include="ServiceStack.Text" Version="8.5.2" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.0.0-preview-1</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache.Serialization.SystemTextJson</PackageId>
<Description>FusionCache serializer based on System.Text.Json</Description>
<PackageTags>json;caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy</PackageTags>
<RootNamespace>ZiggyCreatures.Caching.Fusion.Serialization.SystemTextJson</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReleaseNotes>
- Add: Tagging support (preview)
- Update: package dependencies
</PackageReleaseNotes>
<PackageValidationBaselineVersion>1.0.0</PackageValidationBaselineVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/ZiggyCreatures.FusionCache/FusionCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -657,8 +657,8 @@ internal void ExpireMemoryEntryInternal(string operationId, string key, long? ti
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void CheckTaggingEnabled()
{
if (_options.DisabledTagging)
throw new InvalidOperationException("This operation requires Tagging, which has been disabled via FusionCacheOptions.DisabledTagging.");
if (_options.DisableTagging)
throw new InvalidOperationException("This operation requires Tagging, which has been disabled via FusionCacheOptions.DisableTagging.");
}

private static string GetTagCacheKey(string tag)
Expand Down
2 changes: 1 addition & 1 deletion src/ZiggyCreatures.FusionCache/FusionCacheDiagnostics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class FusionCacheDiagnostics
/// <summary>
/// The current version of FusionCache.
/// </summary>
public const string FusionCacheVersion = "2.0.0-preview-2";
public const string FusionCacheVersion = "2.0.0-preview-3";

/// <summary>
/// The activity source name for FusionCache.
Expand Down
4 changes: 2 additions & 2 deletions src/ZiggyCreatures.FusionCache/FusionCacheOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public TimeSpan BackplaneAutoRecoveryDelay
/// <br/>
/// <strong>NOTE:</strong> this may get to a little performance improvement, but if you'll try to call one of the above methods an <see cref="InvalidOperationException"></see> will be thrown.
/// </summary>
public bool DisabledTagging { get; set; }
public bool DisableTagging { get; set; }

/// <summary>
/// Specify the <see cref="LogLevel"/> to use when some options have incoherent values that have been fixed with a normalization, like for example when a FailSafeMaxDuration is lower than a Duration, so the Duration is used instead.
Expand Down Expand Up @@ -533,7 +533,7 @@ public FusionCacheOptions Duplicate()
IncludeTagsInTraces = IncludeTagsInTraces,
IncludeTagsInMetrics = IncludeTagsInMetrics,

DisabledTagging = DisabledTagging,
DisableTagging = DisableTagging,

SkipAutoCloneForImmutableObjects = SkipAutoCloneForImmutableObjects,

Expand Down
2 changes: 1 addition & 1 deletion src/ZiggyCreatures.FusionCache/FusionCache_Async.cs
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ public async ValueTask ExpireAsync(string key, FusionCacheEntryOptions? options
if (entry is null)
return (null, false);

if (_options.DisabledTagging)
if (_options.DisableTagging)
return (entry, true);

var entryTimestamp = entry.Timestamp;
Expand Down
2 changes: 1 addition & 1 deletion src/ZiggyCreatures.FusionCache/FusionCache_Sync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ public void Expire(string key, FusionCacheEntryOptions? options = null, Cancella
if (entry is null)
return (null, false);

if (_options.DisabledTagging)
if (_options.DisableTagging)
return (entry, true);

var entryTimestamp = entry.Timestamp;
Expand Down
18 changes: 14 additions & 4 deletions src/ZiggyCreatures.FusionCache/ZiggyCreatures.FusionCache.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>
<Version>2.0.0-preview-2</Version>
<Version>2.0.0-preview-3</Version>
<PackageId>ZiggyCreatures.FusionCache</PackageId>
<Description>FusionCache is an easy to use, fast and robust hybrid cache with advanced resiliency features.</Description>
<PackageTags>caching;cache;hybrid;hybrid-cache;hybridcache;multi-level;multilevel;fusion;fusioncache;fusion-cache;performance;async;ziggy</PackageTags>
<RootNamespace>ZiggyCreatures.Caching.Fusion</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReleaseNotes>
- Add: Tagging support (preview)
- Add: Clear() support (preview)
- Add: Tagging support
- Add: Clear support
- Add: native support for Microsoft's new HybridCache (via the new ZiggyCreatures.FusionCache.MicrosoftHybridCache package)
- Fix: soft-fails in a factory (eg: ctx.Fail("Oops")) is now supported for with background factory completion
- Change: better Expire, more predictable
- Change: ReThrowSerializationExceptions does not affect serialization, only deserialization
- Add: support for immutable objects when using Auto-Clone
- Add: support for Tagging/Clear in events
- Add: new IncludeTagsInLogs option
- Add: new IncludeTagsInTraces option
- Add: new IncludeTagsInMetrics option
- Change: the auto-generated InstanceId for each cache is now shorter (saves space in logs and traces)
- Update: all [Obsolete] members has been marked as errors
- Update: package dependencies
</PackageReleaseNotes>
<!--
Expand All @@ -31,7 +41,7 @@

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.0" />
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.10.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.10.0" />
<PackageReference Include="Serilog" Version="4.1.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ItemGroup>
<PackageReference Include="FASTERCache" Version="0.1.21" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.10" />
<PackageReference Include="Serilog" Version="4.1.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Spectre.Console" Version="0.49.1" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions tests/ZiggyCreatures.FusionCache.Tests/MemoryLevelTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2528,7 +2528,7 @@ public void CanSoftFailWithSoftTimeout()
public async Task CanDisableTaggingAsync()
{
var logger = CreateXUnitLogger<FusionCache>();
using var cache = new FusionCache(new FusionCacheOptions() { DisabledTagging = true }, logger: logger);
using var cache = new FusionCache(new FusionCacheOptions() { DisableTagging = true }, logger: logger);

await Assert.ThrowsAsync<InvalidOperationException>(async () =>
{
Expand Down Expand Up @@ -2566,7 +2566,7 @@ await Assert.ThrowsAsync<InvalidOperationException>(async () =>
public void CanDisableTagging()
{
var logger = CreateXUnitLogger<FusionCache>();
using var cache = new FusionCache(new FusionCacheOptions() { DisabledTagging = true }, logger: logger);
using var cache = new FusionCache(new FusionCacheOptions() { DisableTagging = true }, logger: logger);

Assert.Throws<InvalidOperationException>(() =>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.10" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="CacheManager.Microsoft.Extensions.Caching.Memory" Version="1.2.0" />
<PackageReference Include="CacheTower" Version="0.14.0" />
<PackageReference Include="EasyCaching.InMemory" Version="1.9.2" />
Expand Down

0 comments on commit 70514c3

Please sign in to comment.