I set the “SizeLimit” in the memory cache and calculate the size when creating the cached objects.
If I have understood this correctly, the size is not saved in the Distributed Cache.
Therefore there is an exception when the item is loaded from the Distributed Cache into the MemoryCache because the size is then set to “-1”
The only workaround I can see at the moment is to set the size in the “FusionCacheEntryOptions” to an average value. But this makes limiting to a maximum memory consumption inaccurate, especially if the sizes of the individual objects vary greatly
I set the “SizeLimit” in the memory cache and calculate the size when creating the cached objects.
If I have understood this correctly, the size is not saved in the Distributed Cache.
Therefore there is an exception when the item is loaded from the Distributed Cache into the MemoryCache because the size is then set to “-1”
The only workaround I can see at the moment is to set the size in the “FusionCacheEntryOptions” to an average value. But this makes limiting to a maximum memory consumption inaccurate, especially if the sizes of the individual objects vary greatly
Are there any other options?