Caches in Memory but also to Disk, so cache is persistent across restarts, build on Top of Microsoft.Extensions.Caching.Abstractions and LiteDb
PM> Install-Package PersistentMemoryCache -Pre
IMemoryCache cache = new PersistentMemoryCache(new PersistentMemoryCacheOptions("Test", new LiteDbStore(new LiteDbOptions("Test.db"))));
string key = "TestKey";
string value = "TestValue";
cache.Set(key, value);
var retrieve = cache.Get(key);