diff --git a/src/Digdir.Domain.Dialogporten.Infrastructure/InfrastructureExtensions.cs b/src/Digdir.Domain.Dialogporten.Infrastructure/InfrastructureExtensions.cs index 77ed4665d..23289ef81 100644 --- a/src/Digdir.Domain.Dialogporten.Infrastructure/InfrastructureExtensions.cs +++ b/src/Digdir.Domain.Dialogporten.Infrastructure/InfrastructureExtensions.cs @@ -340,7 +340,9 @@ private static IServiceCollection ConfigureFusionCache(this IServiceCollection s // This will stop deserialization exceptions to be re-thrown, which will cause the factory to run as if // the cache entry was not found. This avoids crashes which otherwise would happen if entities that // are cached are changed in a way that makes them incompatible with the cached version. - ReThrowSerializationExceptions = false + ReThrowSerializationExceptions = false, + + EnableAutoClone = true }) .WithRegisteredSerializer() // If Redis is disabled (eg. in local development or non-web runtimes), we must instruct FusionCache to