diff --git a/src/ZiggyCreatures.FusionCache/Internals/Builder/FusionCacheBuilder.cs b/src/ZiggyCreatures.FusionCache/Internals/Builder/FusionCacheBuilder.cs index 436a066e..0c0b1f17 100644 --- a/src/ZiggyCreatures.FusionCache/Internals/Builder/FusionCacheBuilder.cs +++ b/src/ZiggyCreatures.FusionCache/Internals/Builder/FusionCacheBuilder.cs @@ -99,14 +99,17 @@ public IFusionCache Build(IServiceProvider serviceProvider) } } - options ??= Options; - if (options is null) { - options = new FusionCacheOptions() + options = Options; + + if (options is null) { - CacheName = CacheName - }; + options = new FusionCacheOptions() + { + CacheName = CacheName + }; + } } SetupOptionsAction?.Invoke(options);