So this all worked fine before updating to AspNetCore 3 today.
I am using a memory cache with dependency injection (IMemoryCache cache).
I add it to my middleware with services.AddMemoryCache();
and do NOT set a size, but I still end up with the error message:
Cache entry must specify a value for Size when SizeLimit is set.
When I inspect the instance of MemoryCache and it does indeed have a size of 10240 set (see image).
The problem is I've been looking for a hour and I have no clue where this was set. Nowhere in my code do I have SizeLimit or 10240 anywhere - including config files.
It seems to have started when I switched to using app.UseEndpoints instead of app.UseMvc() - but I've made so many changes I'm not sure.
Where could this possibly be set that is elluding me.?
