ZiggyCreatures / FusionCache

FusionCache is an easy to use, fast and robust hybrid cache with advanced resiliency features.
MIT License
1.65k stars 87 forks source link

[FEATURE] Disable receiving backplane notifications #188

Closed celluj34 closed 6 months ago

celluj34 commented 8 months ago

Problem

I have a specific use-case where my data API reads and writes to the cache, and a separate events API that only writes to the cache (to be specific, it only removes entries from the cache). I would like to improve performance by having my events API ignore backplane notifications. I still want them sent from the events API, but never received.

We are using redis as the distributed cache and backplane system.

Solution

Perhaps some other option in the DI setup, ReceiveBackplaneNotifications.

Alternatives

The only alternative we have now is to have the events API maintain a 'normal' cache instance.

Additional context

n/a

jodydonetti commented 6 months ago

Hi @celluj34 sorry for the delay in answering, but I've been quite busy working on the v1.0 that will be released in a matter of weeks (I released the preview1 last week, please take a look if you can!) and preparing for some shows.

Anyway: last week with the preview1 release of the v1.0 I declared a feature freeze, but you asked for this in December and after analyzing it I've found that, on top of adding a new option in the FusionCacheOptions type, it would've been a matter of just 1 extra check on 2 lines total.

And so here it is, the very last feature before going full v1.0.

Please let me know what you think, hope this helps.

celluj34 commented 6 months ago

Awesome, thank you!

jodydonetti commented 6 months ago

Hi @celluj34 , I just released preview2 🥳

Please give it a try, thanks!

jodydonetti commented 6 months ago

Hi all, I've finally released v1.0 🥳

Feels a little unreal tbh, but yep: v1.0 is out.