Memory Cache in dotnet core

前端 未结 3 1342
心在旅途
心在旅途 2021-02-13 14:05

I am trying to write a class to handle Memory cache in a .net core class library. If I use not the core then I could write

using System.Runtime.Caching;
using S         


        
3条回答
  •  逝去的感伤
    2021-02-13 14:58

    The constructor is:

    using Microsoft.Extensions.Caching.Memory;
    

    . . .

    MemoryCache myCache = new MemoryCache(new MemoryCacheOptions());
    

提交回复
热议问题