Closed mjameson-se closed 11 months ago
@mjameson-se
Thanks for raising this. Looks like an issue introduced in 3.1.0 release.
@zhiyuanliang-ms We need to specify size for all entries placed in the cache.
@zhiyuanliang-ms
To repro this issue add the following in Startup.cs of the FeatureFlagDemo example project.
services.AddMemoryCache(mo =>
{
mo.SizeLimit = 50_000_000;
});
This issue occurs when the shared memory cache in DI is configured to have a size limit.
We're in the process of implementing a feature using Azure App Config to power feature gates, but hit a rather annoying snag.
The Feature Manager is getting a shared IMemoryCache from the dependency injection container and tries to add cache entries to it without specifying a size. The only work-around for this seems to be to alter all of our code to register and pull a keyed IMemoryCache instead of the default unkeyed instance.