Skip to content

Commit

Permalink
Update AGentleIntroduction.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jodydonetti authored Jan 24, 2025
1 parent adc1de0 commit 4780894
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions docs/AGentleIntroduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ Enter **soft/hard timeouts**.

Read more [**here**](Timeouts.md), or enjoy the complete [**step by step**](StepByStep.md) guide.


## ↩️ Auto-Recovery([more](AutoRecovery.md))

As we know from the [Fallacies Of Distributed Computing](https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing), something may go wrong while we are using distributed components like the distributed cache or the backplane, even if only in a transient way.
Expand All @@ -115,6 +116,27 @@ Enter **Auto-Recovery**.: everything is done automatically, and it just works.

Read more [**here**](AutoRecovery.md).


## 🏷️ Tagging ([more](Tagging.md))

Tagging is an incredibly powerful feature: cache entries can be tagged with one or more tags, and later they can be evicted all at once by just by calling `RemoveByTag("my-tag")`.

The overall [design](https://github.com/ZiggyCreatures/FusionCache/issues/319) used to achieve this is such that, even when working against a massive cache with millions of entries, will not incur in any upfront cost (yes, even a distributed L2 like a Redis gigantic instance).

Tagging works in any supported scenario: with or without an optional L2 (distributed level), an optional backplane, shared caches, cache key prefix, fail-safe, soft/hard timeouts, auto-recovery and everything else.

Read more [**here**](Tagging.md).


## 🧼 Clear ([more](Clear.md))

Thanks to the design used for the Tagging feature (see above), FusionCache also supports a proper `Clear()` mechanism for the entire cache.

Yes, yes: the abiltiy to clear seems like an easy one but when we consider things like shared caches, cache key prefix and all the other features... it's definitely not an easy feat. But yeah, it just works.

Read more [**here**](Clear.md).


## 🎚️ Options ([more](Options.md))

There are 2 kinds of options:
Expand All @@ -138,6 +160,10 @@ At a high level there are 6 core methods:
- `Expire[Async]`
- `Remove[Async]`

Then there are methods for Tagging and Clear:
- `RemoveByTag[Async]`
- `Clear[Async]`

All of them work **on both the memory cache and the distributed cache** (if any) in a transparent way: we don't have to do anything extra for it to coordinate the 2 levels.

All of them are available in both a **sync** and an **async** version.
Expand All @@ -153,6 +179,7 @@ Everything is natively available for both the **sync** and **async** programming

Any operation works seamlessly with any other, even if one is **sync** and the other is **async**: an example is multiple concurrent factory calls for the same cache key, some of them **sync** while others **async**, all coordinated together at the same time with no problems and a guarantee that only one will be executed at the same time.


## 🔃 Dependency Injection + Builder ([more](DependencyInjection.md))

FusionCache fully supports [Dependency Injection (DI)](https://docs.microsoft.com/en-us/dotnet/core/extensions/dependency-injection), a design pattern to achieve a form of Inversion of Control (IoC) in our code.
Expand All @@ -171,6 +198,20 @@ Thanks to the native [builder](DependencyInjection.md) support, it's very easy t
Read more [**here**](NamedCaches.md).


## Ⓜ️ Support for Microsoft HybridCache ([more](MicrosoftHybridCache.md))

With .NET 9, Microsoft released their new [HybridCache](https://learn.microsoft.com/en-us/aspnet/core/performance/caching/hybrid?view=aspnetcore-9.0).

This may turn the HybridCache abstract class into some sort of "lingua franca" for a basic set of common features for all hybrid caches in .NET.

So FusionCache is available ALSO as an implementation of HybridCache, via an adapter class.

> [!NOTE]
> FusionCache is the FIRST 3rd party implementation of HybridCache from Microsoft. But not just that: in a strange turn of events, since at the time of this writing (Jan 2025) Microsoft has not yet released their default implementation, FusionCache is the FIRST production-ready implementation of HybridCache AT ALL, including the one by Microsoft itself. Quite bonkers 😬
Read more [**here**](MicrosoftHybridCache.md).


## 📞 Events ([more](Events.md))

There's a comprehensive set of events to subscribe to regarding core events inside of a FusionCache instance, both at a high level and at lower levels (memory/distributed levels).
Expand Down

0 comments on commit 4780894

Please sign in to comment.