This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
Caching APIs for adding services need to take in config lambda #152
Closed
Description
The various services.AddXYZCaching()
methods are all parameterless - they need to take in a configuration lambda. Right now you have to call services.Configure<XYZCacheOptions>(options => { options.FooSetting = "value"; });
to configure them.
E.g.:
- https://github.com/aspnet/Caching/blob/dev/src/Microsoft.Extensions.Caching.Redis/RedisCacheServicesExtensions.cs#L22
- https://github.com/aspnet/Caching/blob/dev/src/Microsoft.Extensions.Caching.Memory/MemoryCacheServicesExtensions.cs#L20
Note: The SQL Server services extension method does the right thing: https://github.com/aspnet/Caching/blob/dev/src/Microsoft.Extensions.Caching.SqlServer/SqlServerCacheExtensions.cs#L23-L25
@divega this is what I mentioned to you yesterday.