Closed jon-christensen-ag closed 10 months ago
Hi @jon-christensen-ag and thanks for using FusionCache!
Without more information I can't really know, but since the problem is during deserialization and FusionCache does not provide a serializer but only act as a bridge towards existing ones, and the one you are using seems to be Newtonsoft Json (a.k.a. Json.NET), the problem is most definitely there. Usually in this case it's a circular reference or a wrong configuration with the serializer.
What I would suggest is to try to serialize and deserialize back the same data that you are now caching, using directly Newtonsoft Json, and see what happens: since FusionCache just calls that it's very much probable that you will get the same error.
Hope this helps, let me know if it did work.
To be clear, this is the code that acts as the bridge (a.k.a. adapter) between FusionCache and Newtonsoft Json https://github.com/ZiggyCreatures/FusionCache/blob/main/src/ZiggyCreatures.FusionCache.Serialization.NewtonsoftJson/FusionCacheNewtonsoftJsonSerializer.cs .
As you can see it just forwards the call, that's all.
Closing this, as no answer.
Will reopen if needed.
We have recently added caching to our api using FusionCache and, in production, we are getting the below exception when we try to retrieve our list of Users. We are using the FusionCacheNewtonsoftJsonSerializer with default settings:
The data isn't huge (at least I don't think so) at 38,000 rows from the database. Any thoughts on what we can do to avoid these errors? Any serializer settings that would help?
We are on v.0.20 of FusionCache and 13.0.3 of Newtonsoft.