Skip to content

Can you please add some examples on how to use Auto-Clone? #310

Closed Answered by jodydonetti
oasaleh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @oasaleh

Question: What about named caches? Do I add the serializer here in Progam.cs file?

        builder
            .Services
            .AddFusionCache(Constants.MyCacheName)
            .WithDefaultEntryOptions(opt => { opt.Duration = TimeSpan.FromDays(10); });

Yes, you set the serializer for each cache you setup, named or not:

builder
  .Services
  .AddFusionCache(Constants.MyCacheName)
  .WithSerializer(...) // HERE
  .WithDefaultEntryOptions(opt => { opt.Duration = TimeSpan.FromDays(10); });

Hope this helps!

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@oasaleh
Comment options

@jodydonetti
Comment options

@oasaleh
Comment options

@jodydonetti
Comment options

Answer selected by oasaleh
@jodydonetti
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