Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 899 Bytes

File metadata and controls

21 lines (16 loc) · 899 Bytes

Build status NuGet Badge

Persistent Memory Cache

Caches in Memory but also to Disk, so cache is persistent across restarts, build on Top of Microsoft.Extensions.Caching.Abstractions and LiteDb

Installation

PM> Install-Package PersistentMemoryCache -Pre

Example

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);