Skip to content
Discussion options

You must be logged in to vote

Hi @seifmostafa73 I'll try to make it clearer.

When you say (your code):

builder.Services.AddFusionCache("CallLogsCache")
    // ...
    .AsHybridCache(); // AS HYBRID

what you are saying is "when HybridCache is asked, return the FusionCache instance named "CallLogsCache"".

You don't need to specify the FusionCache name when asking for HybridCache.

But FusionCache can go one step further, meaning it already supports multiple named HybridCache instances: but since there's nothing like IFusionCacheProvider in the HybridCache world, the only way is via keyed services.

So if you do:

builder.Services.AddFusionCache("Foo")
    .AsKeyedHybridCache("Bar"); // AS *KEYED* HYBRID

you are saying is "…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@seifmostafa73
Comment options

@jodydonetti
Comment options

Answer selected by seifmostafa73
@seifmostafa73
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants