【发布时间】:2019-01-07 12:04:04
【问题描述】:
我正在尝试在完整的 .NET Framework 4.7 上运行的 Asp.NET Core 2.1 应用程序中配置 System.Runtime.Caching.MemoryCache。
在另一个非 Asp.NET Core 应用程序中,我在 Web.config 中进行了配置,如下所示:
<system.runtime.caching>
<memoryCache>
<namedCaches>
<add name="default" cacheMemoryLimitMegabytes="0" physicalMemoryLimitPercentage="0" pollingInterval="00:02:00" />
</namedCaches>
</memoryCache>
</system.runtime.caching>
但是,在 Asp.NET Core 2.1 应用程序中,我只有 appsetting.json。在 Asp.NET Core 2.1 中如何配置System.Runtime.Caching.MemoryCache?
【问题讨论】:
标签: c# asp.net asp.net-core appsettings memorycache